Codeforces Round 200 (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
343 Codeforces Round 200 (Div. 1) FINISHED False 7800 358525797 Sept. 14, 2013, 3:30 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 5929 ) D Water Tree PROGRAMMING data structures dfs and similar graphs trees 2100

B'Mad scientist Mike has constructed a rooted tree, which consists of n vertices. Each vertex is a reservoir which can be either empty or filled with water. The vertices of the tree are numbered from 1 to n with the root at vertex 1. For each vertex, the reservoirs of its children are located below the reservoir of this vertex, and the vertex is connected with each of the children by a pipe through which water can flow downwards. Mike wants to do the following operations with the tree: Mike has already compiled a full list of operations that he wants to perform in order. Before experimenting with the tree Mike decided to run the list through a simulation. Help Mike determine what results will he get after performing all the operations. The first line of the input contains an integer n (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89500000) -- the number of vertices in the tree. Each of the following n xe2 x80 x89- xe2 x80 x891 lines contains two space-separated numbers ai, bi (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ai, xe2 x80 x89bi xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n, ai xe2 x80 x89 xe2 x89 xa0 xe2 x80 x89bi) -- the edges of the tree. The next line contains a number q (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89q xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89500000) -- the number of operations to perform. Each of the following q lines contains two space-separated numbers ci (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ci xe2 x80 x89 xe2 x89 xa4 xe2 x80 x893), vi (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89vi xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n), where ci is the operation type (according to the numbering given in the statement), and vi is the vertex on which the operation is performed. It is guaranteed that the given graph is a tree. For each type 3 operation print 1 on a separate line if the vertex is full, and 0 if the vertex is empty. Print the answers to queries in the order in which the queries are given in the input.'...

Tutorials

Codeforces Round #200 Tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
4472985 MrJigan1488 D Sept. 14, 2013, 8:58 p.m. OK Delphi TESTS 43 1216 85094400 2100
4468495 valeriy.stromov D Sept. 14, 2013, 5:12 p.m. OK Delphi TESTS 43 1216 85094400 2100
4913979 pal3 D Oct. 27, 2013, 3:30 p.m. OK FPC TESTS 43 717 32563200 2100
4475803 Nik_Storm_2010 D Sept. 15, 2013, 8:27 a.m. OK FPC TESTS 43 1310 40652800 2100
4465603 Alex_2oo8 D Sept. 14, 2013, 4:36 p.m. OK FPC TESTS 43 1340 46182400 2100
4475790 Nik_Storm_2010 D Sept. 15, 2013, 8:26 a.m. OK FPC TESTS 43 1372 40652800 2100
5140682 zhzq123 D Nov. 18, 2013, 10:39 a.m. OK FPC TESTS 43 1372 62771200 2100
15504079 Valerich D Jan. 22, 2016, 8:13 p.m. OK FPC TESTS 43 1419 72089600 2100
4509832 Alex_2oo8 D Sept. 20, 2013, 12:41 p.m. OK FPC TESTS 43 1434 46284800 2100
4543783 Alex_2oo8 D Sept. 23, 2013, 4:18 p.m. OK FPC TESTS 43 1466 46182400 2100
18171095 dmlocdmloc D May 31, 2016, 3:49 p.m. OK FPC TESTS 43 1544 59801600 2100
4474907 weizhaohui D Sept. 15, 2013, 5:19 a.m. OK FPC TESTS 43 1560 58572800 2100
14503616 forlfs D Nov. 27, 2015, 1:32 a.m. OK GNU C TESTS 43 904 74649600 2100
12290320 sanketM D July 31, 2015, 10:48 a.m. OK GNU C TESTS 43 1122 48332800 2100
7033686 vis10326 D July 6, 2014, 4:17 p.m. OK GNU C TESTS 43 1528 62361600 2100
42279961 vjudge4 D Aug. 30, 2018, 1:41 p.m. OK GNU C++ TESTS 43 280 33894400 2100
42279741 vjudge2 D Aug. 30, 2018, 1:34 p.m. OK GNU C++ TESTS 43 296 33894400 2100
39672907 quantum11 D June 26, 2018, 10:41 a.m. OK GNU C++ TESTS 43 327 26214400 2100
39673303 quantum11 D June 26, 2018, 10:58 a.m. OK GNU C++ TESTS 43 327 26316800 2100
37364417 zjq2863974342 D April 16, 2018, 3:31 a.m. OK GNU C++ TESTS 43 327 30310400 2100
42279656 vjudge3 D Aug. 30, 2018, 1:32 p.m. OK GNU C++ TESTS 43 327 33894400 2100
31445064 vjudge1 D Oct. 17, 2017, 10:45 a.m. OK GNU C++ TESTS 43 327 36044800 2100
37363768 zjq2863974342 D April 16, 2018, 2:11 a.m. OK GNU C++ TESTS 43 343 30310400 2100
29252764 fdf D Aug. 7, 2017, 4:06 a.m. OK GNU C++ TESTS 43 343 40345600 2100
42279326 vjudge2 D Aug. 30, 2018, 1:22 p.m. OK GNU C++ TESTS 43 358 33894400 2100
7055490 kllp D July 9, 2014, 11:25 p.m. OK GNU C++0x TESTS 43 1152 51609600 2100
4463979 KADR D Sept. 14, 2013, 4:17 p.m. OK GNU C++0x TESTS 43 1154 50585600 2100
4477499 Mark_Fan D Sept. 15, 2013, 12:55 p.m. OK GNU C++0x TESTS 43 1216 63078400 2100
7055498 kllp D July 9, 2014, 11:30 p.m. OK GNU C++0x TESTS 43 1248 51609600 2100
7743532 WZL D Sept. 11, 2014, 2:08 p.m. OK GNU C++0x TESTS 43 1278 80076800 2100
7015819 Arterm D July 5, 2014, 11:52 a.m. OK GNU C++0x TESTS 43 1308 40755200 2100
4476114 Shtrix D Sept. 15, 2013, 9:13 a.m. OK GNU C++0x TESTS 43 1310 35942400 2100
5592527 mayukuner D Dec. 31, 2013, 1:26 p.m. OK GNU C++0x TESTS 43 1372 60211200 2100
6147660 danielfleischman D March 26, 2014, 12:42 p.m. OK GNU C++0x TESTS 43 1402 63078400 2100
9914409 stefanzzz D Feb. 18, 2015, 1 p.m. OK GNU C++0x TESTS 43 1404 54067200 2100
58513439 rainboy D Aug. 9, 2019, 8:37 p.m. OK GNU C11 TESTS 43 1824 37990400 2100
42731470 yzh666 D Sept. 10, 2018, 11:49 a.m. OK GNU C++11 TESTS 43 249 30412800 2100
44365553 LittleBeetle D Oct. 15, 2018, 4:28 p.m. OK GNU C++11 TESTS 43 265 79872000 2100
42730441 quantum11 D Sept. 10, 2018, 11:12 a.m. OK GNU C++11 TESTS 43 295 30412800 2100
42731564 yzh666 D Sept. 10, 2018, 11:53 a.m. OK GNU C++11 TESTS 43 295 30412800 2100
62573349 vjudge5 D Oct. 14, 2019, 3:10 p.m. OK GNU C++11 TESTS 43 327 30310400 2100
25337048 LIN452 D March 8, 2017, 8:43 a.m. OK GNU C++11 TESTS 43 327 50176000 2100
41560917 badcw D Aug. 13, 2018, 2:11 p.m. OK GNU C++11 TESTS 43 343 48025600 2100
42969752 ___new2zy___ D Sept. 17, 2018, 5:08 a.m. OK GNU C++11 TESTS 43 358 40345600 2100
53091145 zheng_lw D April 21, 2019, 11:17 a.m. OK GNU C++11 TESTS 43 389 80076800 2100
42969827 ___new2zy___ D Sept. 17, 2018, 5:13 a.m. OK GNU C++11 TESTS 43 404 40243200 2100
29224728 miamiao D Aug. 5, 2017, 5:45 p.m. OK GNU C++14 TESTS 43 498 115200000 2100
28007556 ascchrvalstr D June 24, 2017, 3:06 p.m. OK GNU C++14 TESTS 43 624 52531200 2100
67145413 ElangBondol D Dec. 18, 2019, 8:38 a.m. OK GNU C++14 TESTS 43 639 42086400 2100
61924818 vjudge1 D Oct. 5, 2019, 2:17 p.m. OK GNU C++14 TESTS 43 639 50073600 2100
59247494 jizhonglu D Aug. 22, 2019, 1:17 a.m. OK GNU C++14 TESTS 43 639 66150400 2100
29186023 ascchrvalstr D Aug. 4, 2017, 6:40 a.m. OK GNU C++14 TESTS 43 654 52531200 2100
57260861 KwanghyunOn D July 18, 2019, 5:04 a.m. OK GNU C++14 TESTS 43 654 59084800 2100
59213962 vjudge4 D Aug. 21, 2019, 9:30 a.m. OK GNU C++14 TESTS 43 655 54579200 2100
52068317 vjudge5 D March 31, 2019, 6:38 a.m. OK GNU C++14 TESTS 43 670 50688000 2100
23613750 bciobanu D Jan. 6, 2017, 10:14 p.m. OK GNU C++14 TESTS 43 670 60108800 2100
52779956 dmkozyrev D April 15, 2019, 1:47 p.m. OK GNU C++17 TESTS 43 483 28262400 2100
52779775 armoking D April 15, 2019, 1:42 p.m. OK GNU C++17 TESTS 43 514 55091200 2100
52780068 armoking D April 15, 2019, 1:51 p.m. OK GNU C++17 TESTS 43 514 55091200 2100
52774012 armoking D April 15, 2019, 10:57 a.m. OK GNU C++17 TESTS 43 514 77414400 2100
52773123 armoking D April 15, 2019, 10:22 a.m. OK GNU C++17 TESTS 43 529 80486400 2100
52779935 dmkozyrev D April 15, 2019, 1:46 p.m. OK GNU C++17 TESTS 43 530 28262400 2100
52773985 armoking D April 15, 2019, 10:56 a.m. OK GNU C++17 TESTS 43 530 77414400 2100
65739540 910306264 D Nov. 26, 2019, 9:30 a.m. OK GNU C++17 TESTS 43 545 54169600 2100
52779794 armoking D April 15, 2019, 1:43 p.m. OK GNU C++17 TESTS 43 545 77414400 2100
52773824 armoking D April 15, 2019, 10:49 a.m. OK GNU C++17 TESTS 43 560 76390400 2100
65454228 its_aks_ulure D Nov. 20, 2019, 7:36 p.m. OK Java 11 TESTS 43 1279 245043200 2100
64590508 Garett D Nov. 9, 2019, 2:37 p.m. OK Java 11 TESTS 43 1357 120320000 2100
64590326 Garett D Nov. 9, 2019, 2:33 p.m. OK Java 11 TESTS 43 1388 120320000 2100
69177073 zhanyi_xiaolu D Jan. 20, 2020, 8:31 a.m. OK Java 11 TESTS 43 1403 194355200 2100
65454332 its_aks_ulure D Nov. 20, 2019, 7:40 p.m. OK Java 11 TESTS 43 1700 264601600 2100
4463587 uwi D Sept. 14, 2013, 4:10 p.m. OK Java 6 TESTS 43 1872 77926400 2100
5947658 Thost D March 6, 2014, 3:27 a.m. OK Java 6 TESTS 43 2246 154521600 2100
4502719 Thomas_Ahle D Sept. 19, 2013, 10:15 a.m. OK Java 6 TESTS 43 2620 153190400 2100
4502728 Thomas_Ahle D Sept. 19, 2013, 10:16 a.m. OK Java 6 TESTS 43 2682 153190400 2100
5947761 Thost D March 6, 2014, 3:52 a.m. OK Java 6 TESTS 43 2930 141926400 2100
8555514 mashinist D Nov. 5, 2014, 8:20 a.m. OK Java 6 TESTS 43 3088 218009600 2100
9966355 emo D Feb. 23, 2015, 7:17 a.m. OK Java 7 TESTS 43 1028 42291200 2100
4479639 cerealguy D Sept. 15, 2013, 7:04 p.m. OK Java 7 TESTS 43 1092 19046400 2100
4475138 cerealguy D Sept. 15, 2013, 6:19 a.m. OK Java 7 TESTS 43 1154 33075200 2100
4485448 tanzaku D Sept. 16, 2013, 8:51 p.m. OK Java 7 TESTS 43 1560 59801600 2100
4463359 Petr D Sept. 14, 2013, 4:08 p.m. OK Java 7 TESTS 43 1590 43008000 2100
17028976 zodiacleo D March 30, 2016, 6:23 a.m. OK Java 7 TESTS 43 1653 193945600 2100
5826303 hama-du D Jan. 28, 2014, 3:15 p.m. OK Java 7 TESTS 43 1902 71577600 2100
4478011 Klein D Sept. 15, 2013, 2:15 p.m. OK Java 7 TESTS 43 1902 86118400 2100
4462367 niyaznigmatul D Sept. 14, 2013, 3:59 p.m. OK Java 7 TESTS 43 1996 82124800 2100
4478565 MrDindows D Sept. 15, 2013, 3:47 p.m. OK Java 7 TESTS 43 2246 199987200 2100
48908215 BiIIy D Jan. 24, 2019, 10:38 p.m. OK Java 8 TESTS 43 795 90419200 2100
28692631 MazzForces D July 19, 2017, 9:52 a.m. OK Java 8 TESTS 43 1076 117248000 2100
48550387 BiIIy D Jan. 19, 2019, 1:17 a.m. OK Java 8 TESTS 43 1138 138547200 2100
29623679 stark29 D Aug. 20, 2017, 2:42 p.m. OK Java 8 TESTS 43 1138 268390400 2100
47089079 Ahmad D Dec. 16, 2018, 4:04 a.m. OK Java 8 TESTS 43 1154 187904000 2100
27700214 RP_9 D June 10, 2017, 5:09 a.m. OK Java 8 TESTS 43 1154 246988800 2100
27700256 RP_9 D June 10, 2017, 5:15 a.m. OK Java 8 TESTS 43 1201 246988800 2100
40194179 Jeel_Vaishnav D July 11, 2018, 8:14 a.m. OK Java 8 TESTS 43 1216 191590400 2100
54738213 amolpratap007 D May 28, 2019, 6:19 a.m. OK Java 8 TESTS 43 1216 268390400 2100
57737825 Ahmed_Diab D July 25, 2019, 10:29 a.m. OK Java 8 TESTS 43 1231 86425600 2100
60994799 vjudge1 D Sept. 21, 2019, 8:46 a.m. OK MS C++ TESTS 43 545 69222400 2100
59269370 vjudge2 D Aug. 22, 2019, 12:06 p.m. OK MS C++ TESTS 43 561 60108800 2100
46352539 vjudge1 D Nov. 29, 2018, 6:19 a.m. OK MS C++ TESTS 43 561 60108800 2100
59427362 vjudge3 D Aug. 25, 2019, 3:48 a.m. OK MS C++ TESTS 43 576 60108800 2100
61268543 vjudge3 D Sept. 25, 2019, 1:25 p.m. OK MS C++ TESTS 43 577 54067200 2100
59427173 vjudge3 D Aug. 25, 2019, 3:35 a.m. OK MS C++ TESTS 43 592 60108800 2100
59137023 vjudge2 D Aug. 20, 2019, 1:02 p.m. OK MS C++ TESTS 43 592 62054400 2100
56139443 vjudge4 D June 27, 2019, 2:11 a.m. OK MS C++ TESTS 43 607 56115200 2100
59427206 vjudge5 D Aug. 25, 2019, 3:38 a.m. OK MS C++ TESTS 43 623 60108800 2100
59136940 vjudge2 D Aug. 20, 2019, 1 p.m. OK MS C++ TESTS 43 623 64614400 2100
59381577 vjudge4 D Aug. 24, 2019, 3:32 a.m. OK MS C++ 2017 TESTS 43 826 50176000 2100
62671187 vjudge2 D Oct. 16, 2019, 9:49 a.m. OK MS C++ 2017 TESTS 43 2277 68505600 2100
27676691 EbTech D June 8, 2017, 5:57 p.m. OK Rust TESTS 43 1840 79257600 2100
26897437 EbTech D May 6, 2017, 9:18 a.m. OK Rust TESTS 43 1840 146534400 2100
26907206 EbTech D May 6, 2017, 5:46 p.m. OK Rust TESTS 43 1856 79257600 2100
27775005 EbTech D June 14, 2017, 1:56 p.m. OK Rust TESTS 43 1871 79360000 2100
26897497 EbTech D May 6, 2017, 9:22 a.m. OK Rust TESTS 43 1965 79257600 2100

remove filters

Back to search problems