Codeforces Round 146 (Div. 1)

Solutions are presented as using the least memory and the fastest execution time. It also takes the top 10 most recent solutions from each language. If you want to limit to a specific index, click the "Solved" button and go to that problem.

ContestId
Name
Phase
Frozen
Duration (Seconds)
Relative Time
Start Time
235 Codeforces Round 146 (Div. 1) FINISHED False 7200 381019799 Oct. 21, 2012, 7:10 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 506 ) D Graph Game PROGRAMMING graphs 3000

B'In computer science, there is a method called "Divide And Conquer By Node" to solve some hard problems about paths on a tree. Let 's desribe how this method works by function: solve(t) (t is a tree): This ends when t has only one node because after deleting it, there 's nothing. Now, WJMZBMR has mistakenly believed that it 's ok to chose any node in "Line A". So he 'll chose a node at random. To make the situation worse, he thinks a "tree" should have the same number of edges and nodes! So this procedure becomes like that. Let 's define the variable totalCost. Initially the value of totalCost equal to 0. So, solve(t) (now t is a graph): He 'll apply solve on a connected graph with n nodes and n edges. He thinks it will work quickly, but it 's very slow. So he wants to know the expectation of totalCost of this procedure. Can you help him? The first line contains an integer n (3 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x893000) -- the number of nodes and edges in the graph. Each of the next n lines contains two space-separated integers ai, xe2 x80 x89bi (0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ai, xe2 x80 x89bi xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89- xe2 x80 x891) indicating an edge between nodes ai and bi. Consider that the graph nodes are numbered from 0 to (n xe2 x80 x89- xe2 x80 x891). It 's guaranteed that there are no self-loops, no multiple edges in that graph. It 's guaranteed that the graph is connected. Print a single real number -- the expectation of totalCost. Your answer will be considered correct if its absolute or relative error does not exceed 10 xe2 x80 x89- xe2 x80 x896. Consider the second example. No matter what we choose first, the totalCost will always be 3 xe2 x80 x89+ xe2 x80 x892 xe2 x80 x89+ xe2 x80 x891 xe2 x80 x89= xe2 x80 x896.'...

Tutorials

Codeforces Round #146 Tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
10630151 louisja1 D April 8, 2015, 12:26 p.m. OK FPC TESTS 77 342 204800 3000
11668083 ljz D June 19, 2015, 12:20 p.m. OK FPC TESTS 77 342 409600 3000
10635617 yubaby D April 9, 2015, 12:06 a.m. OK FPC TESTS 77 342 36352000 3000
8844729 Jupitercal D Nov. 25, 2014, 11:06 a.m. OK FPC TESTS 77 374 204800 3000
9267841 faebdc D Dec. 25, 2014, 1:25 p.m. OK GNU C++ TESTS 77 122 74752000 3000
40990597 ReaLNero1 D July 31, 2018, 12:03 a.m. OK GNU C++ TESTS 77 156 307200 3000
2683443 Master_Prog D Dec. 1, 2012, 11:06 a.m. OK GNU C++ TESTS 77 156 409600 3000
2466691 lashakob D Oct. 29, 2012, 12:05 p.m. OK GNU C++ TESTS 77 156 409600 3000
2412721 giorgi20002000 D Oct. 22, 2012, 5:17 p.m. OK GNU C++ TESTS 77 156 409600 3000
2469620 hogloid D Oct. 30, 2012, 8:03 a.m. OK GNU C++ TESTS 77 171 307200 3000
2404277 YuukaKazami D Oct. 21, 2012, 2:05 p.m. OK GNU C++ TESTS 77 171 409600 3000
8162139 jiry_2 D Oct. 10, 2014, 3:04 a.m. OK GNU C++ TESTS 77 186 307200 3000
2408861 pwecar D Oct. 22, 2012, 1:47 p.m. OK GNU C++ TESTS 77 203 307200 3000
24088696 xzyxzy D Jan. 24, 2017, 9:35 a.m. OK GNU C++ TESTS 77 216 2457600 3000
7990041 equation314 D Sept. 28, 2014, 3:40 a.m. OK GNU C++0x TESTS 77 434 36454400 3000
9816886 zxc901 D Feb. 13, 2015, 2:05 p.m. OK GNU C++0x TESTS 77 498 307200 3000
8542503 zshi D Nov. 4, 2014, 3:56 a.m. OK GNU C++0x TESTS 77 1092 512000 3000
49934551 HeHere D Feb. 15, 2019, 6:36 a.m. OK GNU C++11 TESTS 77 92 409600 3000
47879951 skywalkert D Jan. 3, 2019, 5:43 p.m. OK GNU C++11 TESTS 77 92 72499200 3000
67598133 xryjr233 D Dec. 25, 2019, 10:59 a.m. OK GNU C++11 TESTS 77 124 36556800 3000
53848993 _twilight D May 7, 2019, 12:30 p.m. OK GNU C++11 TESTS 77 156 307200 3000
62918632 aszwz D Oct. 19, 2019, 9:23 a.m. OK GNU C++11 TESTS 77 156 36352000 3000
54806085 Itst D May 29, 2019, 2:13 p.m. OK GNU C++11 TESTS 77 186 204800 3000
67311356 vjudge2 D Dec. 21, 2019, 3:06 a.m. OK GNU C++11 TESTS 77 186 307200 3000
55004892 SoiMae D June 3, 2019, 6:58 a.m. OK GNU C++11 TESTS 77 186 307200 3000
67599175 dysyn1314 D Dec. 25, 2019, 11:18 a.m. OK GNU C++11 TESTS 77 186 1331200 3000
24603534 20140355 D Feb. 12, 2017, 7:37 a.m. OK GNU C++11 TESTS 77 186 2457600 3000
49930434 vjudge5 D Feb. 15, 2019, 4:01 a.m. OK GNU C++14 TESTS 77 92 512000 3000
66754309 137_345_2814 D Dec. 13, 2019, 5:47 a.m. OK GNU C++14 TESTS 77 122 72806400 3000
28176880 Yousef_Salama D June 30, 2017, 4:26 p.m. OK GNU C++14 TESTS 77 186 2662400 3000
67498678 ZZZZZZZZZZZZZZZZZZ D Dec. 24, 2019, 2:20 a.m. OK GNU C++14 TESTS 77 218 512000 3000
61593670 MinecraftFuns D Oct. 1, 2019, 7:58 a.m. OK GNU C++14 TESTS 77 312 307200 3000
23667000 Ali.Pi D Jan. 9, 2017, 4:32 p.m. OK GNU C++14 TESTS 77 342 2150400 3000
49928463 cnnfls_csy D Feb. 15, 2019, 2:06 a.m. OK GNU C++14 TESTS 77 372 36659200 3000
49904840 ugly2333 D Feb. 14, 2019, 11:27 a.m. OK GNU C++14 TESTS 77 374 512000 3000
37877639 CuriousCat.hzw D May 4, 2018, 8:05 a.m. OK GNU C++14 TESTS 77 374 3891200 3000
56183882 Scut82 D June 28, 2019, 2:55 a.m. OK GNU C++14 TESTS 77 374 38912000 3000
50058828 SKY_magician D Feb. 17, 2019, 11:42 a.m. OK GNU C++17 TESTS 77 154 37273600 3000
51574137 Als123 D March 20, 2019, 12:28 p.m. OK GNU C++17 TESTS 77 216 36556800 3000
49905569 lqs2015 D Feb. 14, 2019, 11:46 a.m. OK GNU C++17 TESTS 77 218 512000 3000
49911696 vjudge2 D Feb. 14, 2019, 2:29 p.m. OK GNU C++17 TESTS 77 310 36556800 3000
67595863 naitir D Dec. 25, 2019, 10:37 a.m. OK GNU C++17 TESTS 77 310 64614400 3000
43365261 crathva D Sept. 24, 2018, 11:56 a.m. OK GNU C++17 TESTS 77 342 409600 3000
57000630 Rose_max D July 14, 2019, 3:15 a.m. OK GNU C++17 TESTS 77 372 36454400 3000
50573676 ruo D Feb. 27, 2019, 4:49 p.m. OK GNU C++17 TESTS 77 498 409600 3000
52564958 Isonan D April 10, 2019, 12:05 p.m. OK GNU C++17 TESTS 77 1872 614400 3000
2405395 hariprasath D Oct. 21, 2012, 5:40 p.m. OK Java 6 TESTS 77 453 102400 3000
2405343 hariprasath D Oct. 21, 2012, 5:29 p.m. OK Java 6 TESTS 77 453 102400 3000
2401228 Petr D Oct. 21, 2012, 8:31 a.m. OK Java 6 TESTS 77 468 102400 3000
2494192 uwi D Nov. 3, 2012, 9:48 a.m. OK Java 6 TESTS 77 765 0 3000
2494187 uwi D Nov. 3, 2012, 9:46 a.m. OK Java 6 TESTS 77 828 0 3000
2479831 uwi D Nov. 1, 2012, 3:03 p.m. OK Java 6 TESTS 77 906 0 3000
4480435 PlayLikeNeverB4 D Sept. 15, 2013, 10:41 p.m. OK Java 7 TESTS 77 342 409600 3000
19151215 dwp D July 15, 2016, 11:10 a.m. OK MS C++ TESTS 77 280 204800 3000

remove filters

Back to search problems