Codeforces Round 177 (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
288 Codeforces Round 177 (Div. 1) FINISHED False 7200 372781797 April 2, 2013, 3:30 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 761 ) D Polo the Penguin and Trees PROGRAMMING combinatorics dfs and similar trees 2300

B"Little penguin Polo has got a tree -- a non-directed connected acyclic graph, containing n nodes and n xe2 x80 x89- xe2 x80 x891 edges. We will consider the tree nodes numbered by integers from 1 to n. Today Polo wonders, how to find the number of pairs of paths that don't have common nodes. More formally, he should find the number of groups of four integers a, xe2 x80 x89b, xe2 x80 x89c and d such that: The shortest path betweem two nodes is the path that is shortest in the number of edges. Help Polo solve this problem. The first line contains integer n (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x8980000) -- the number of tree nodes. Each of the following n xe2 x80 x89- xe2 x80 x891 lines contains a pair of integers ui and vi (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ui, xe2 x80 x89vi xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n; ui xe2 x80 x89 xe2 x89 xa0 xe2 x80 x89vi) -- the i-th edge of the tree. It is guaranteed that the given graph is a tree. In a single line print a single integer -- the answer to the problem. Please do not use the %lld specificator to read or write 64-bit numbers in xd0 xa1++. It is recommended to use the cin, cout streams or the %I64d specificator."...

Tutorials

Codeforces Round #177, editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
3473323 Alex_2oo8 D April 4, 2013, 2:09 p.m. OK FPC TESTS 41 62 9728000 2300
3468792 vlad107 D April 3, 2013, 12:24 p.m. OK FPC TESTS 41 62 20377600 2300
3480261 zscc D April 6, 2013, 2:39 p.m. OK FPC TESTS 41 93 5632000 2300
3551595 football1222 D April 16, 2013, 9:58 a.m. OK FPC TESTS 41 109 12185600 2300
3474655 JustN D April 4, 2013, 8:33 p.m. OK FPC TESTS 41 125 13004800 2300
3479268 Eilleen D April 6, 2013, 8:47 a.m. OK GNU C++ TESTS 41 31 11468800 2300
3467795 bakabakashyoshyo D April 3, 2013, 8:28 a.m. OK GNU C++ TESTS 41 31 246374400 2300
3533934 zhj D April 14, 2013, 11:01 a.m. OK GNU C++ TESTS 41 46 9113600 2300
4103248 tmeteorj D July 19, 2013, 7:58 a.m. OK GNU C++ TESTS 41 46 9420800 2300
3551310 emoi D April 16, 2013, 8:46 a.m. OK GNU C++ TESTS 41 46 10444800 2300
3465035 luzilon1 D April 2, 2013, 6:21 p.m. OK GNU C++ TESTS 41 62 4505600 2300
18945751 DaibaNana D July 7, 2016, 7:36 a.m. OK GNU C++ TESTS 41 62 6656000 2300
3465106 luzilon1 D April 2, 2013, 6:26 p.m. OK GNU C++ TESTS 41 62 7065600 2300
3828185 JFantasy D June 6, 2013, 2:13 p.m. OK GNU C++ TESTS 41 62 7168000 2300
4336748 yobobobo D Aug. 25, 2013, 4:36 p.m. OK GNU C++ TESTS 41 62 7270400 2300
3468340 BryantMark D April 3, 2013, 10:51 a.m. OK GNU C++0x TESTS 41 46 8192000 2300
3469202 MinakoKojima D April 3, 2013, 1:45 p.m. OK GNU C++0x TESTS 41 46 8601600 2300
6017730 FancyCoder D March 15, 2014, 2:54 a.m. OK GNU C++0x TESTS 41 62 7577600 2300
5830080 mayukuner D Jan. 29, 2014, 6:22 a.m. OK GNU C++0x TESTS 41 92 8908800 2300
3540953 LovelyPenguin D April 15, 2013, 12:24 p.m. OK GNU C++0x TESTS 41 93 6553600 2300
3468318 BryantMark D April 3, 2013, 10:44 a.m. OK GNU C++0x TESTS 41 93 10035200 2300
3459934 GuyUpLion D April 2, 2013, 4:31 p.m. OK GNU C++0x TESTS 41 93 10444800 2300
3460741 sexyprincess91 D April 2, 2013, 4:41 p.m. OK GNU C++0x TESTS 41 109 10137600 2300
3466235 stan D April 2, 2013, 10:30 p.m. OK GNU C++0x TESTS 41 109 14131200 2300
9336004 determinism D Dec. 31, 2014, 10:58 p.m. OK GNU C++0x TESTS 41 124 7884800 2300
28137650 yah01 D June 29, 2017, 11:01 a.m. OK GNU C++11 TESTS 41 62 16076800 2300
32619637 Hamzqq9 D Nov. 24, 2017, 11:57 a.m. OK GNU C++11 TESTS 41 92 7680000 2300
55062884 SoiMae D June 4, 2019, 1 a.m. OK GNU C++11 TESTS 41 92 7987200 2300
13020928 cq_phqg D Sept. 16, 2015, 10:25 a.m. OK GNU C++11 TESTS 41 92 11468800 2300
52334611 xielinhan D April 5, 2019, 7:15 a.m. OK GNU C++11 TESTS 41 92 12288000 2300
11343685 LoveYY D May 29, 2015, 9:53 a.m. OK GNU C++11 TESTS 41 122 8396800 2300
18903431 vjudge2 D July 5, 2016, 3:23 p.m. OK GNU C++11 TESTS 41 122 8806400 2300
56738113 RainAir D July 9, 2019, 6:25 a.m. OK GNU C++11 TESTS 41 124 6451200 2300
55073629 SoiMae D June 4, 2019, 7:30 a.m. OK GNU C++11 TESTS 41 124 7372800 2300
21819237 Pakalns D Oct. 27, 2016, 11:06 a.m. OK GNU C++11 TESTS 41 124 7372800 2300
67195751 ElangBondol D Dec. 19, 2019, 8:58 a.m. OK GNU C++14 TESTS 41 124 5017600 2300
22703980 Qoogle D Dec. 5, 2016, 3:18 a.m. OK GNU C++14 TESTS 41 124 7782400 2300
32794246 Flash-boy D Nov. 30, 2017, 2:59 a.m. OK GNU C++14 TESTS 41 124 8499200 2300
26863794 2020.01.09_Restart D May 4, 2017, 6 p.m. OK GNU C++14 TESTS 41 124 9113600 2300
65058996 Arg_007 D Nov. 15, 2019, 4:13 p.m. OK GNU C++14 TESTS 41 124 12083200 2300
30852644 LincHpin D Sept. 30, 2017, 1:18 a.m. OK GNU C++14 TESTS 41 124 14336000 2300
47957497 RobeZH D Jan. 5, 2019, 7:14 a.m. OK GNU C++14 TESTS 41 154 7475200 2300
31005393 KhaleD_ D Oct. 5, 2017, 1:38 a.m. OK GNU C++14 TESTS 41 154 7782400 2300
55803409 I_love_chickpea D June 19, 2019, 8:19 p.m. OK GNU C++14 TESTS 41 154 8601600 2300
30782539 mainstring D Sept. 27, 2017, 4:13 p.m. OK GNU C++14 TESTS 41 154 9420800 2300
46910649 Dalgerok D Dec. 11, 2018, 4:44 p.m. OK GNU C++17 TESTS 41 124 7782400 2300
52335137 ruo D April 5, 2019, 7:33 a.m. OK GNU C++17 TESTS 41 154 9318400 2300
60389915 VodkaInTheJar D Sept. 11, 2019, 12:55 p.m. OK GNU C++17 TESTS 41 154 11980800 2300
63947559 Leonidas D Oct. 31, 2019, 7:34 p.m. OK GNU C++17 TESTS 41 154 14438400 2300
52582184 Borbi D April 10, 2019, 7:55 p.m. OK GNU C++17 TESTS 41 156 8601600 2300
52569281 stoyan_malinin D April 10, 2019, 1:37 p.m. OK GNU C++17 TESTS 41 156 10137600 2300
61490061 Atanaskoto557 D Sept. 29, 2019, 1:50 p.m. OK GNU C++17 TESTS 41 156 10342400 2300
57099282 aviroop123 D July 15, 2019, 1:14 p.m. OK GNU C++17 TESTS 41 156 10342400 2300
43526963 fblogy D Sept. 28, 2018, 11:49 a.m. OK GNU C++17 TESTS 41 156 10547200 2300
61777650 fsociety00 D Oct. 3, 2019, 12:11 p.m. OK GNU C++17 TESTS 41 156 13414400 2300
3464313 uwi D April 2, 2013, 5:48 p.m. OK Java 6 TESTS 41 140 102400 2300
3961881 Sammarize D June 26, 2013, 12:02 a.m. OK Java 6 TESTS 41 343 1536000 2300
3585724 hama-du D April 21, 2013, 3:33 p.m. OK Java 6 TESTS 41 750 9011200 2300
3465053 S.Yesipenko D April 2, 2013, 6:23 p.m. OK Java 7 TESTS 41 203 21196800 2300
3464664 Di735 D April 2, 2013, 6:01 p.m. OK Java 7 TESTS 41 296 29081600 2300
3462982 mmaxio D April 2, 2013, 5:11 p.m. OK Java 7 TESTS 41 327 12902400 2300
3562494 xenoslash D April 19, 2013, 3:42 a.m. OK Java 7 TESTS 41 375 23347200 2300
3699858 ftiasch D May 10, 2013, 4:09 p.m. OK Java 7 TESTS 41 421 36659200 2300
3478437 lydxlx D April 6, 2013, 4:25 a.m. OK Java 7 TESTS 41 796 27648000 2300
14180826 Sumeet.Varma D Nov. 10, 2015, 6:39 a.m. OK Java 8 TESTS 41 560 64819200 2300
10682657 AlexFetisov D April 12, 2015, 5:58 p.m. OK Java 8 TESTS 41 686 3891200 2300
59446047 Eva D Aug. 25, 2019, 1:23 p.m. OK Kotlin TESTS 41 1652 40345600 2300
3466969 BIT_silence D April 3, 2013, 4:44 a.m. OK MS C++ TESTS 41 62 8294400 2300
3609982 caustique D April 23, 2013, 8:31 a.m. OK MS C++ TESTS 41 78 5632000 2300
3465084 yvasyliv D April 2, 2013, 6:25 p.m. OK MS C++ TESTS 41 78 7884800 2300
3470884 Sklyack D April 3, 2013, 10 p.m. OK MS C++ TESTS 41 78 10956800 2300
3463179 RomaWhite D April 2, 2013, 5:14 p.m. OK MS C++ TESTS 41 93 7680000 2300
3469526 hgame D April 3, 2013, 2:59 p.m. OK MS C++ TESTS 41 93 7987200 2300
3464320 GlebsHP D April 2, 2013, 5:48 p.m. OK MS C++ TESTS 41 93 8089600 2300
3465238 Monyura D April 2, 2013, 6:38 p.m. OK MS C++ TESTS 41 93 8192000 2300
3465122 KhaustovPavel D April 2, 2013, 6:28 p.m. OK MS C++ TESTS 41 93 9113600 2300
3470881 Sklyack D April 3, 2013, 9:57 p.m. OK MS C++ TESTS 41 93 10956800 2300
6577756 apia D May 9, 2014, 12:51 p.m. OK Python 2 TESTS 41 1028 9830400 2300
35857739 ______u______ D March 2, 2018, 8:46 p.m. OK Python 2 TESTS 41 1184 14336000 2300
35857486 ______n______ D March 2, 2018, 8:40 p.m. OK Python 2 TESTS 41 1184 14336000 2300
35857012 _____i_____ D March 2, 2018, 8:32 p.m. OK Python 2 TESTS 41 1184 14336000 2300
35856884 _____k_____ D March 2, 2018, 8:28 p.m. OK Python 2 TESTS 41 1184 14336000 2300
35848313 ______h______ D March 2, 2018, 4:56 p.m. OK Python 2 TESTS 41 1184 14336000 2300
35848308 ______k______ D March 2, 2018, 4:56 p.m. OK Python 2 TESTS 41 1184 14336000 2300
35847864 ______i______ D March 2, 2018, 4:50 p.m. OK Python 2 TESTS 41 1184 14336000 2300
35843412 ______M______ D March 2, 2018, 3:11 p.m. OK Python 2 TESTS 41 1184 14336000 2300
3464764 winger D April 2, 2013, 6:05 p.m. OK Scala TESTS 41 1575 69324800 2300

remove filters

Back to search problems