Codeforces Round 135 (Div. 2)

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
219 Codeforces Round 135 (Div. 2) FINISHED False 7200 391789786 Aug. 27, 2012, 3:30 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 9844 ) D Choosing Capital for Treeland PROGRAMMING dfs and similar dp graphs trees 1900

B"The country Treeland consists of n cities, some pairs of them are connected with unidirectional roads. Overall there are n xe2 x80 x89- xe2 x80 x891 roads in the country. We know that if we don't take the direction of the roads into consideration, we can get from any city to any other one. The council of the elders has recently decided to choose the capital of Treeland. Of course it should be a city of this country. The council is supposed to meet in the capital and regularly move from the capital to other cities (at this stage nobody is thinking about getting back to the capital from these cities). For that reason if city a is chosen a capital, then all roads must be oriented so that if we move along them, we can get from city a to any other city. For that some roads may have to be inversed. Help the elders to choose the capital so that they have to inverse the minimum number of roads in the country. The first input line contains integer n (2 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x892 xc2 xb7105) -- the number of cities in Treeland. Next n xe2 x80 x89- xe2 x80 x891 lines contain the descriptions of the roads, one road per line. A road is described by a pair of integers si, xe2 x80 x89ti (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89si, xe2 x80 x89ti xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n; si xe2 x80 x89 xe2 x89 xa0 xe2 x80 x89ti) -- the numbers of cities, connected by that road. The i-th road is oriented from city si to city ti. You can consider cities in Treeland indexed from 1 to n. In the first line print the minimum number of roads to be inversed if the capital is chosen optimally. In the second line print all possible ways to choose the capital -- a sequence of indexes of cities in the increasing order."...

Tutorials

User editorial for Codeforces Round #135 (Div. 2)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
2069446 MrJigan1488 D Aug. 30, 2012, 1:32 p.m. OK Delphi TESTS 34 130 136704000 1900
2923615 Mosyagin D Jan. 14, 2013, 10:35 a.m. OK Delphi TESTS 34 140 11264000 1900
3936777 AHTuTTuTyX D June 22, 2013, 7:30 p.m. OK Delphi TESTS 34 140 14233600 1900
2098067 KaiZeR D Sept. 5, 2012, 4:28 p.m. OK Delphi TESTS 34 170 49868800 1900
3936783 AHTuTTuTyX D June 22, 2013, 7:32 p.m. OK Delphi TESTS 34 171 14233600 1900
2069809 Anastasko D Aug. 30, 2012, 3:43 p.m. OK Delphi TESTS 34 280 22528000 1900
2388716 pufff D Oct. 19, 2012, 8:56 p.m. OK Delphi TESTS 34 281 33075200 1900
2771117 Misha100896 D Dec. 15, 2012, 7:39 p.m. OK Delphi TESTS 34 328 8806400 1900
2068648 Unnamed D Aug. 30, 2012, 8:40 a.m. OK FPC TESTS 34 170 13414400 1900
2068600 hxy2906 D Aug. 30, 2012, 8:20 a.m. OK FPC TESTS 34 170 19251200 1900
2103774 nxphuc D Sept. 8, 2012, 8:48 a.m. OK FPC TESTS 34 171 7168000 1900
2103793 anvy D Sept. 8, 2012, 8:53 a.m. OK FPC TESTS 34 171 11571200 1900
3128237 Nik_Storm_2010 D Feb. 14, 2013, 11:57 a.m. OK FPC TESTS 34 187 10649600 1900
2514566 wzcjj D Nov. 6, 2012, 12:01 p.m. OK FPC TESTS 34 187 12185600 1900
2104060 LifeKeeper D Sept. 8, 2012, 11:22 a.m. OK FPC TESTS 34 187 16076800 1900
2069882 Dima_qwer D Aug. 30, 2012, 4:28 p.m. OK FPC TESTS 34 190 13516800 1900
2068484 ptnk8554517 D Aug. 30, 2012, 7:22 a.m. OK FPC TESTS 34 190 17408000 1900
2302609 thaison1496 D Oct. 5, 2012, 1:52 p.m. OK FPC TESTS 34 203 9830400 1900
4300761 hjhee D Aug. 17, 2013, 2:37 a.m. OK GNU C TESTS 34 186 14438400 1900
2636293 hariprasath D Nov. 24, 2012, 8:07 a.m. OK GNU C TESTS 34 234 13619200 1900
8396379 rafaUNA D Oct. 24, 2014, 11:36 p.m. OK GNU C TESTS 34 248 13619200 1900
2108910 pedja D Sept. 10, 2012, 1:48 p.m. OK GNU C TESTS 34 300 20684800 1900
28371063 rainboy D July 8, 2017, 2:16 p.m. OK GNU C TESTS 34 312 22118400 1900
6899090 punitkoura D June 16, 2014, 11:39 a.m. OK GNU C TESTS 34 374 27443200 1900
34575609 vjudge3 D Jan. 26, 2018, 12:40 p.m. OK GNU C++ TESTS 34 92 18022400 1900
4913690 deletelazy D Oct. 27, 2013, 2:33 p.m. OK GNU C++ TESTS 34 109 16998400 1900
29820974 vjudge2 D Aug. 27, 2017, 7:28 a.m. OK GNU C++ TESTS 34 122 13004800 1900
13547771 vjudge5 D Oct. 11, 2015, 3:31 p.m. OK GNU C++ TESTS 34 122 13619200 1900
42111131 vjudge2 D Aug. 26, 2018, 6:08 a.m. OK GNU C++ TESTS 34 122 15974400 1900
35083929 vjudge2 D Feb. 9, 2018, 9:04 a.m. OK GNU C++ TESTS 34 122 18022400 1900
34167989 wyqwyq D Jan. 14, 2018, 6:17 a.m. OK GNU C++ TESTS 34 122 18022400 1900
34167711 fengbj D Jan. 14, 2018, 6:01 a.m. OK GNU C++ TESTS 34 122 18022400 1900
25771454 vjudge2 D March 24, 2017, 11:54 a.m. OK GNU C++ TESTS 34 122 18124800 1900
40158987 vjudge5 D July 10, 2018, 5:49 a.m. OK GNU C++ TESTS 34 122 20889600 1900
2856961 2011330300713 D Dec. 30, 2012, 12:49 p.m. OK GNU C++0x TESTS 34 187 15974400 1900
7481873 cinya D Aug. 16, 2014, 9:15 a.m. OK GNU C++0x TESTS 34 216 15155200 1900
6677626 mc_mosa D May 21, 2014, 9:59 p.m. OK GNU C++0x TESTS 34 218 10444800 1900
6557221 halfo D May 5, 2014, 1:27 p.m. OK GNU C++0x TESTS 34 218 15974400 1900
5745535 pikapika D Jan. 20, 2014, 10:10 a.m. OK GNU C++0x TESTS 34 218 18329600 1900
2479504 wccy D Nov. 1, 2012, 1:54 p.m. OK GNU C++0x TESTS 34 234 16793600 1900
4083044 ValenKof D July 17, 2013, 12:55 a.m. OK GNU C++0x TESTS 34 234 20992000 1900
2682906 Xerxes D Dec. 1, 2012, 7:17 a.m. OK GNU C++0x TESTS 34 265 11468800 1900
6856421 multisystem D June 9, 2014, 8:53 p.m. OK GNU C++0x TESTS 34 278 19660800 1900
6951900 chrome D June 24, 2014, 9:29 a.m. OK GNU C++0x TESTS 34 278 22016000 1900
59140471 wangxintong D Aug. 20, 2019, 2:13 p.m. OK GNU C11 TESTS 34 1372 13619200 1900
64906624 vmcaj D Nov. 14, 2019, 10:32 p.m. OK GNU C11 TESTS 34 1372 25804800 1900
59138509 wangrongfeng D Aug. 20, 2019, 1:32 p.m. OK GNU C11 TESTS 34 1404 15974400 1900
64906690 urda D Nov. 14, 2019, 10:36 p.m. OK GNU C11 TESTS 34 1404 25804800 1900
64600348 jose.elias.gv99 D Nov. 9, 2019, 6:27 p.m. OK GNU C11 TESTS 34 1434 13619200 1900
64845660 norecursarelp D Nov. 13, 2019, 5:30 p.m. OK GNU C11 TESTS 34 1464 13619200 1900
64909167 nicoespb D Nov. 15, 2019, 1:35 a.m. OK GNU C11 TESTS 34 1464 78540800 1900
64909152 nicolasespb D Nov. 15, 2019, 1:35 a.m. OK GNU C11 TESTS 34 1464 78540800 1900
64749438 Chong_Su D Nov. 12, 2019, 2:41 p.m. OK GNU C11 TESTS 34 1496 21094400 1900
64749520 Rodgui D Nov. 12, 2019, 2:43 p.m. OK GNU C11 TESTS 34 1496 21094400 1900
44259188 nicous D Oct. 13, 2018, 1:42 p.m. OK GNU C++11 TESTS 34 92 8704000 1900
57794361 Zed_knight D July 26, 2019, 10:51 a.m. OK GNU C++11 TESTS 34 92 11980800 1900
52328411 luogu_bot1 D April 5, 2019, 3:08 a.m. OK GNU C++11 TESTS 34 92 15769600 1900
58433589 luogu_bot5 D Aug. 7, 2019, 12:54 p.m. OK GNU C++11 TESTS 34 92 16793600 1900
64159235 luogu_bot2 D Nov. 3, 2019, 1:53 p.m. OK GNU C++11 TESTS 34 122 8908800 1900
60774510 CYJJJian D Sept. 18, 2019, 1:52 p.m. OK GNU C++11 TESTS 34 122 13926400 1900
59623002 Adelard D Aug. 28, 2019, 2:50 p.m. OK GNU C++11 TESTS 34 122 15974400 1900
52328195 luogu_bot3 D April 5, 2019, 2:57 a.m. OK GNU C++11 TESTS 34 122 15974400 1900
60300040 vjudge4 D Sept. 9, 2019, 11:49 a.m. OK GNU C++11 TESTS 34 122 16179200 1900
22278544 thwfhk D Nov. 16, 2016, 11:36 p.m. OK GNU C++11 TESTS 34 122 16793600 1900
30488578 mengxiang000 D Sept. 19, 2017, 5:18 a.m. OK GNU C++14 TESTS 34 216 29388800 1900
50645253 vjudge5 D March 1, 2019, 3:30 p.m. OK GNU C++14 TESTS 34 218 14336000 1900
48701418 vjudge4 D Jan. 22, 2019, 2:56 a.m. OK GNU C++14 TESTS 34 218 15974400 1900
31190725 linmiaomiao D Oct. 10, 2017, 1:20 p.m. OK GNU C++14 TESTS 34 218 19251200 1900
62337193 Cruiying D Oct. 11, 2019, 2:26 a.m. OK GNU C++14 TESTS 34 218 33587200 1900
44337682 vaibh1297 D Oct. 14, 2018, 11:37 p.m. OK GNU C++14 TESTS 34 248 13619200 1900
28628149 vjudge2 D July 17, 2017, 5:45 a.m. OK GNU C++14 TESTS 34 248 14438400 1900
48701380 vjudge2 D Jan. 22, 2019, 2:56 a.m. OK GNU C++14 TESTS 34 248 15769600 1900
48711435 vjudge2 D Jan. 22, 2019, 8:45 a.m. OK GNU C++14 TESTS 34 248 15974400 1900
58384255 vjudge1 D Aug. 6, 2019, 11:17 a.m. OK GNU C++14 TESTS 34 248 15974400 1900
41243726 vjudge3 D Aug. 5, 2018, 11:55 a.m. OK GNU C++17 TESTS 34 186 19763200 1900
41243646 vjudge4 D Aug. 5, 2018, 11:52 a.m. OK GNU C++17 TESTS 34 186 19763200 1900
60486056 Yzm007 D Sept. 13, 2019, 12:40 p.m. OK GNU C++17 TESTS 34 218 15974400 1900
48699016 vjudge5 D Jan. 22, 2019, 1:28 a.m. OK GNU C++17 TESTS 34 218 16793600 1900
56477580 vjudge1 D July 3, 2019, 1:51 p.m. OK GNU C++17 TESTS 34 218 16793600 1900
48663518 vjudge5 D Jan. 21, 2019, 7:02 a.m. OK GNU C++17 TESTS 34 218 17100800 1900
45136461 A_root_A D Oct. 31, 2018, 12:34 p.m. OK GNU C++17 TESTS 34 218 17203200 1900
54226744 vjudge2 D May 16, 2019, 6:43 a.m. OK GNU C++17 TESTS 34 218 19968000 1900
51997049 vjudge5 D March 30, 2019, 3:11 a.m. OK GNU C++17 TESTS 34 218 20172800 1900
49985436 vjudge3 D Feb. 16, 2019, 10:20 a.m. OK GNU C++17 TESTS 34 248 12800000 1900
51697089 opqq D March 22, 2019, 3:34 p.m. OK Go TESTS 34 1932 48537600 1900
2609482 watashi D Nov. 21, 2012, 9:15 a.m. OK Haskell TESTS 34 968 57753600 1900
67307163 Oom D Dec. 20, 2019, 10:16 p.m. OK Java 11 TESTS 34 1372 68915200 1900
2085690 tehqin D Sept. 1, 2012, 4:18 a.m. OK Java 6 TESTS 34 670 100044800 1900
3037737 mahmoudhanafi D Jan. 30, 2013, 4:26 p.m. OK Java 6 TESTS 34 703 57139200 1900
2690092 Ahmed.Ibrahem D Dec. 2, 2012, 9:56 p.m. OK Java 6 TESTS 34 750 38195200 1900
2389050 calculus.saransh D Oct. 20, 2012, 3:33 a.m. OK Java 6 TESTS 34 953 75161600 1900
5446064 alibaba D Dec. 15, 2013, 3:39 p.m. OK Java 6 TESTS 34 1028 55603200 1900
2090796 Omar.Darwish D Sept. 2, 2012, 4:56 p.m. OK Java 6 TESTS 34 1030 189337600 1900
2098936 andreyrmg D Sept. 6, 2012, 6:12 a.m. OK Java 6 TESTS 34 1050 113664000 1900
4039483 mkirsche D July 8, 2013, 3:23 p.m. OK Java 6 TESTS 34 1093 92979200 1900
2805505 xiaowuc1 D Dec. 22, 2012, 6:11 a.m. OK Java 6 TESTS 34 1109 77516800 1900
3042194 llaki D Jan. 31, 2013, 8:21 p.m. OK Java 6 TESTS 34 1156 105881600 1900
3995126 MOSJAVA D June 30, 2013, 10:51 a.m. OK Java 7 TESTS 34 562 51302400 1900
10621031 vjudge4 D April 7, 2015, 12:25 p.m. OK Java 7 TESTS 34 622 21196800 1900
3580229 vjudge4 D April 20, 2013, 11:19 a.m. OK Java 7 TESTS 34 795 57036800 1900
2144790 Andreos D Sept. 11, 2012, 4:16 p.m. OK Java 7 TESTS 34 980 122163200 1900
15691685 DukeOfYork D Jan. 31, 2016, 9:15 a.m. OK Java 7 TESTS 34 1060 80691200 1900
9305117 upsolving D Dec. 30, 2014, 12:25 p.m. OK Java 7 TESTS 34 1090 63180800 1900
3938318 Zzyzx D June 23, 2013, 9:39 a.m. OK Java 7 TESTS 34 1218 110182400 1900
3938330 Zzyzx D June 23, 2013, 9:42 a.m. OK Java 7 TESTS 34 1250 117350400 1900
19289054 MazzForces D July 20, 2016, 10:19 p.m. OK Java 7 TESTS 34 1372 70041600 1900
5442897 miguelmaurizio D Dec. 15, 2013, 4:30 a.m. OK Java 7 TESTS 34 1840 95129600 1900
39289801 KulikAlex D June 16, 2018, 2:23 p.m. OK Java 8 TESTS 34 530 10444800 1900
47372680 aman28rwt D Dec. 22, 2018, 3:13 p.m. OK Java 8 TESTS 34 560 35123200 1900
47372632 aman28rwt D Dec. 22, 2018, 3:11 p.m. OK Java 8 TESTS 34 592 35020800 1900
33276901 prashanth_rebala D Dec. 15, 2017, 8:55 p.m. OK Java 8 TESTS 34 686 41779200 1900
20670760 motivation_error D Sept. 17, 2016, 12:54 a.m. OK Java 8 TESTS 34 810 58368000 1900
43178531 Ahmed_Diab D Sept. 21, 2018, 12:27 p.m. OK Java 8 TESTS 34 840 33280000 1900
50386534 BNL D Feb. 23, 2019, 12:22 p.m. OK Java 8 TESTS 34 842 99020800 1900
30457458 Maulik_Patel D Sept. 18, 2017, 7:26 a.m. OK Java 8 TESTS 34 872 64307200 1900
47969817 typedef_2000 D Jan. 5, 2019, 2:03 p.m. OK Java 8 TESTS 34 904 81612800 1900
39884749 amolpratap007 D July 3, 2018, 6:09 a.m. OK Java 8 TESTS 34 996 89190400 1900
7480731 Eeyore D Aug. 16, 2014, 6:57 a.m. OK JavaScript TESTS 34 1994 67584000 1900
58117371 NewLuminous D Aug. 1, 2019, 9:21 a.m. OK Mono C# TESTS 34 966 36249600 1900
15457310 og.kostya D Jan. 20, 2016, 5:43 p.m. OK MS C# TESTS 34 778 41369600 1900
3769238 kolobok D May 25, 2013, 1:49 p.m. OK MS C# TESTS 34 781 27648000 1900
22927246 pomjuice D Dec. 13, 2016, 1:25 p.m. OK MS C# TESTS 34 2308 66662400 1900
44033410 vjudge5 D Oct. 9, 2018, 11:56 a.m. OK MS C++ TESTS 34 156 13824000 1900
3266218 cchuncoder D March 8, 2013, 2:06 p.m. OK MS C++ TESTS 34 171 11161600 1900
3849606 honestman D June 9, 2013, 7:17 a.m. OK MS C++ TESTS 34 171 15564800 1900
12414213 vjudge1 D Aug. 8, 2015, 12:09 p.m. OK MS C++ TESTS 34 186 11161600 1900
56690079 vjudge4 D July 8, 2019, 3:05 a.m. OK MS C++ TESTS 34 186 11980800 1900
59084839 vjudge4 D Aug. 19, 2019, 10:39 a.m. OK MS C++ TESTS 34 186 11980800 1900
54409587 vjudge2 D May 20, 2019, 8:53 a.m. OK MS C++ TESTS 34 186 11980800 1900
48866639 vjudge2 D Jan. 24, 2019, 3:37 a.m. OK MS C++ TESTS 34 186 11980800 1900
48866202 vjudge1 D Jan. 24, 2019, 3:18 a.m. OK MS C++ TESTS 34 186 11980800 1900
48862874 vjudge2 D Jan. 24, 2019, 12:37 a.m. OK MS C++ TESTS 34 186 11980800 1900
59945413 CtrlAlt D Sept. 3, 2019, 12:50 p.m. OK MS C++ 2017 TESTS 34 466 18432000 1900
58187788 yorky D Aug. 2, 2019, 5:56 p.m. OK MS C++ 2017 TESTS 34 840 22425600 1900
55807860 titititi D June 20, 2019, 12:56 a.m. OK MS C++ 2017 TESTS 34 842 12697600 1900
2249454 Schrodi D Sept. 25, 2012, 11:56 a.m. OK Ocaml TESTS 34 687 22630400 1900
2249248 Schrodi D Sept. 25, 2012, 11:14 a.m. OK Ocaml TESTS 34 703 22630400 1900
26509563 Loveice D April 20, 2017, 7:06 a.m. OK Ocaml TESTS 34 780 27238400 1900
68319036 UTMoonlight D Jan. 6, 2020, 2:15 p.m. OK PyPy 3 TESTS 34 2028 66457600 1900
2750835 kolobok D Dec. 11, 2012, 11:26 a.m. OK Python 2 TESTS 34 1875 100249600 1900
2929661 konstantanter D Jan. 16, 2013, 12:23 p.m. OK Python 2 TESTS 34 1953 52428800 1900
5176608 yugle7 D Nov. 20, 2013, 12:53 p.m. OK Python 2 TESTS 34 2308 38809600 1900
2750878 kolobok D Dec. 11, 2012, 11:37 a.m. OK Python 2 TESTS 34 2359 100249600 1900
2750865 kolobok D Dec. 11, 2012, 11:34 a.m. OK Python 2 TESTS 34 2375 100249600 1900
2750844 kolobok D Dec. 11, 2012, 11:30 a.m. OK Python 2 TESTS 34 2375 100249600 1900
2750840 kolobok D Dec. 11, 2012, 11:29 a.m. OK Python 2 TESTS 34 2390 100249600 1900
2750869 kolobok D Dec. 11, 2012, 11:34 a.m. OK Python 2 TESTS 34 2406 100249600 1900
2070861 tzador D Aug. 31, 2012, 7:24 a.m. OK Python 2 TESTS 34 2440 54476800 1900
2750872 kolobok D Dec. 11, 2012, 11:36 a.m. OK Python 2 TESTS 34 2453 100249600 1900
68710176 Firepaw D Jan. 13, 2020, 12:43 p.m. OK Python 3 TESTS 34 2244 47308800 1900
62330299 alisaleh1 D Oct. 10, 2019, 8:21 p.m. OK Python 3 TESTS 34 2308 38400000 1900
32889615 Jiburiru D Dec. 3, 2017, 3:43 a.m. OK Python 3 TESTS 34 2588 45260800 1900
35848165 ______n______ D March 2, 2018, 4:55 p.m. OK Python 3 TESTS 34 2682 44544000 1900
35848004 ______u______ D March 2, 2018, 4:51 p.m. OK Python 3 TESTS 34 2682 44544000 1900
35847650 _____i_____ D March 2, 2018, 4:46 p.m. OK Python 3 TESTS 34 2682 44544000 1900
35847591 _____k_____ D March 2, 2018, 4:45 p.m. OK Python 3 TESTS 34 2682 44544000 1900
35841020 ______h______ D March 2, 2018, 2:27 p.m. OK Python 3 TESTS 34 2682 44544000 1900
35840973 ______k______ D March 2, 2018, 2:27 p.m. OK Python 3 TESTS 34 2682 44544000 1900
35840664 ______i______ D March 2, 2018, 2:21 p.m. OK Python 3 TESTS 34 2682 44544000 1900

remove filters

Back to search problems