Manthan, Codefest 18 (rated, Div. 1 + 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
1037 Manthan, Codefest 18 (rated, Div. 1 + Div. 2) FINISHED False 7200 195924299 Sept. 2, 2018, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 15005 ) D Valid BFS? PROGRAMMING dfs and similar graphs shortest paths trees 1700

B'The BFS algorithm is defined as follows. Since the order of choosing neighbors of each vertex can vary, it turns out that there may be multiple sequences which BFS can print. In this problem you need to check whether a given sequence corresponds to some valid BFS traversal of the given tree starting from vertex 1 . The tree is an undirected graph, such that there is exactly one simple path between any two vertices. The first line contains a single integer n ( 1 <= n <= 2 cdot 10^5 ) which denotes the number of nodes in the tree. The following n - 1 lines describe the edges of the tree. Each of them contains two integers x and y ( 1 <= x, y <= n ) -- the endpoints of the corresponding edge of the tree. It is guaranteed that the given graph is a tree. The last line contains n distinct integers a_1, a_2, ldots, a_n ( 1 <= a_i <= n ) -- the sequence to check. Print "Yes" (quotes for clarity) if the sequence corresponds to some valid BFS traversal of the given tree and "No" (quotes for clarity) otherwise. You can print each letter in any case (upper or lower). Both sample tests have the same tree in them. In this tree, there are two valid BFS orderings: The ordering 1, 2, 4, 3 doesn 't correspond to any valid BFS order. '...

Tutorials

Tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
42966352 rr_ D Sept. 17, 2018, 1:19 a.m. OK D TESTS 64 421 53862400 1700
44341552 king_of_gamers D Oct. 15, 2018, 3:59 a.m. OK FPC TESTS 64 124 7270400 1700
44341529 king_of_gamers D Oct. 15, 2018, 3:58 a.m. OK FPC TESTS 64 124 7987200 1700
44343217 king_of_gamers D Oct. 15, 2018, 5:22 a.m. OK FPC TESTS 64 139 7270400 1700
44342613 king_of_gamers D Oct. 15, 2018, 4:56 a.m. OK FPC TESTS 64 139 7987200 1700
44341761 king_of_gamers D Oct. 15, 2018, 4:13 a.m. OK FPC TESTS 64 140 7270400 1700
44342946 king_of_gamers D Oct. 15, 2018, 5:10 a.m. OK FPC TESTS 64 140 7270400 1700
44342883 king_of_gamers D Oct. 15, 2018, 5:07 a.m. OK FPC TESTS 64 140 7270400 1700
44341786 king_of_gamers D Oct. 15, 2018, 4:14 a.m. OK FPC TESTS 64 140 7270400 1700
44341686 king_of_gamers D Oct. 15, 2018, 4:08 a.m. OK FPC TESTS 64 140 7270400 1700
44341902 king_of_gamers D Oct. 15, 2018, 4:19 a.m. OK FPC TESTS 64 140 7987200 1700
42423144 Dilute D Sept. 3, 2018, 11:22 a.m. OK GNU C++ TESTS 64 46 6144000 1700
42429092 hangyesheng D Sept. 3, 2018, 2:01 p.m. OK GNU C++ TESTS 64 61 7372800 1700
42426697 zhtzht D Sept. 3, 2018, 12:59 p.m. OK GNU C++ TESTS 64 62 5734400 1700
42418232 _AxclbkJ_ D Sept. 3, 2018, 8:35 a.m. OK GNU C++ TESTS 64 93 9625600 1700
42427341 vjudge3 D Sept. 3, 2018, 1:17 p.m. OK GNU C++ TESTS 64 108 9932800 1700
42414441 drlong10th D Sept. 3, 2018, 6:11 a.m. OK GNU C++ TESTS 64 109 10752000 1700
42462368 Toosample D Sept. 4, 2018, 2:12 p.m. OK GNU C++ TESTS 64 124 6553600 1700
42445999 samjia2000 D Sept. 4, 2018, 3:22 a.m. OK GNU C++ TESTS 64 124 6553600 1700
42423998 tt1724369779 D Sept. 3, 2018, 11:46 a.m. OK GNU C++ TESTS 64 124 6553600 1700
42449970 Smokey_Days D Sept. 4, 2018, 7:15 a.m. OK GNU C++ TESTS 64 124 6860800 1700
57320013 MRoy D July 19, 2019, 9:37 a.m. OK GNU C11 TESTS 64 139 11468800 1700
48373058 Bramble D Jan. 14, 2019, 5:55 a.m. OK GNU C11 TESTS 64 187 13824000 1700
49980700 zhaotiensn D Feb. 16, 2019, 8:08 a.m. OK GNU C++11 TESTS 64 46 5632000 1700
62546006 lslzf D Oct. 14, 2019, 6:29 a.m. OK GNU C++11 TESTS 64 46 6553600 1700
59445921 wxyww D Aug. 25, 2019, 1:20 p.m. OK GNU C++11 TESTS 64 46 6553600 1700
44342451 superjj D Oct. 15, 2018, 4:49 a.m. OK GNU C++11 TESTS 64 46 7270400 1700
46665244 Clao_015 D Dec. 6, 2018, 12:49 a.m. OK GNU C++11 TESTS 64 46 7270400 1700
46666161 luogu_bot1 D Dec. 6, 2018, 2:18 a.m. OK GNU C++11 TESTS 64 46 7270400 1700
45120942 luogu_bot3 D Oct. 31, 2018, 4:23 a.m. OK GNU C++11 TESTS 64 46 7372800 1700
45120933 207M D Oct. 31, 2018, 4:22 a.m. OK GNU C++11 TESTS 64 46 7372800 1700
62516559 520Enterprise D Oct. 13, 2019, 2:32 p.m. OK GNU C++11 TESTS 64 46 7372800 1700
62516358 520Enterprise D Oct. 13, 2019, 2:29 p.m. OK GNU C++11 TESTS 64 46 7372800 1700
42491874 xiaolongbao D Sept. 5, 2018, 12:30 p.m. OK GNU C++14 TESTS 64 139 7577600 1700
66087601 vjudge2 D Dec. 1, 2019, 5:48 a.m. OK GNU C++14 TESTS 64 140 8294400 1700
48387190 Osea D Jan. 14, 2019, 1:38 p.m. OK GNU C++14 TESTS 64 140 9830400 1700
48387193 vjudge5 D Jan. 14, 2019, 1:38 p.m. OK GNU C++14 TESTS 64 140 9830400 1700
45266993 vjudge3 D Nov. 4, 2018, 6:28 a.m. OK GNU C++14 TESTS 64 140 11366400 1700
42481605 Elegia D Sept. 5, 2018, 6:02 a.m. OK GNU C++14 TESTS 64 155 6758400 1700
50146909 vjudge4 D Feb. 19, 2019, 4:54 a.m. OK GNU C++14 TESTS 64 155 7372800 1700
43162292 fengyecong D Sept. 21, 2018, 2:20 a.m. OK GNU C++14 TESTS 64 155 7372800 1700
42429291 enaim D Sept. 3, 2018, 2:05 p.m. OK GNU C++14 TESTS 64 155 10137600 1700
48405499 Osea D Jan. 15, 2019, 3:12 a.m. OK GNU C++14 TESTS 64 155 10137600 1700
65692964 910306264 D Nov. 25, 2019, 6:12 a.m. OK GNU C++17 TESTS 64 46 7065600 1700
44428151 orzcyand1317 D Oct. 17, 2018, 6:03 a.m. OK GNU C++17 TESTS 64 93 9625600 1700
45676003 njtech1401170216 D Nov. 13, 2018, 1:08 p.m. OK GNU C++17 TESTS 64 124 14848000 1700
66092217 vjudge4 D Dec. 1, 2019, 7:28 a.m. OK GNU C++17 TESTS 64 139 9011200 1700
68695755 kaike D Jan. 13, 2020, 7:52 a.m. OK GNU C++17 TESTS 64 140 6451200 1700
61350289 vjudge1 D Sept. 27, 2019, 7:44 a.m. OK GNU C++17 TESTS 64 140 9932800 1700
45076674 ST_Reborn D Oct. 30, 2018, 1:29 a.m. OK GNU C++17 TESTS 64 155 7475200 1700
59438992 McDic D Aug. 25, 2019, 10:15 a.m. OK GNU C++17 TESTS 64 155 9216000 1700
49311742 vighneshq D Feb. 1, 2019, 8:18 a.m. OK GNU C++17 TESTS 64 155 9830400 1700
44827981 Lamductan D Oct. 25, 2018, 7:09 a.m. OK GNU C++17 TESTS 64 155 10444800 1700
62396767 synapse D Oct. 12, 2019, 5:49 a.m. OK Go TESTS 64 498 23244800 1700
62396570 synapse D Oct. 12, 2019, 5:44 a.m. OK Go TESTS 64 514 23347200 1700
43356380 Marii D Sept. 24, 2018, 6:36 a.m. OK Go TESTS 64 748 32563200 1700
42728306 treasuryonly D Sept. 10, 2018, 9:35 a.m. OK Go TESTS 64 888 38912000 1700
66769431 zhanyi_xiaolu D Dec. 13, 2019, 7:44 a.m. OK Java 11 TESTS 64 483 32153600 1700
42460948 In_The_Name_Of_Love D Sept. 4, 2018, 1:37 p.m. OK Java 8 TESTS 64 187 5222400 1700
42424672 StayAwayFromBitches D Sept. 3, 2018, 12:06 p.m. OK Java 8 TESTS 64 202 4403200 1700
42412489 aman28rwt D Sept. 3, 2018, 3:13 a.m. OK Java 8 TESTS 64 311 15564800 1700
43618614 Ahmed_Diab D Sept. 30, 2018, 5:49 p.m. OK Java 8 TESTS 64 327 15564800 1700
47342780 kusomushi D Dec. 21, 2018, 6:07 p.m. OK Java 8 TESTS 64 374 33792000 1700
43816623 dyhu083 D Oct. 5, 2018, 5:45 a.m. OK Java 8 TESTS 64 389 24780800 1700
51121826 sonusingh.nitaa D March 10, 2019, 9:37 a.m. OK Java 8 TESTS 64 389 38912000 1700
59447394 i_will_be_less_than_blue D Aug. 25, 2019, 1:53 p.m. OK Java 8 TESTS 64 389 56832000 1700
42433611 java_geek D Sept. 3, 2018, 4:06 p.m. OK Java 8 TESTS 64 405 18944000 1700
48956934 mufaddalnaya D Jan. 26, 2019, 5:04 a.m. OK Java 8 TESTS 64 436 40652800 1700
59937478 Spheniscine D Sept. 3, 2019, 10:03 a.m. OK Kotlin TESTS 64 1200 137523200 1700
59937843 Spheniscine D Sept. 3, 2019, 10:12 a.m. OK Kotlin TESTS 64 1247 138547200 1700
50771752 seirion D March 4, 2019, 5:27 a.m. OK Kotlin TESTS 64 1497 119808000 1700
50771729 seirion D March 4, 2019, 5:25 a.m. OK Kotlin TESTS 64 1606 120729600 1700
55644154 og.kostya D June 16, 2019, 11:35 a.m. OK Mono C# TESTS 64 280 37171200 1700
42411857 camypaper D Sept. 3, 2018, 2:04 a.m. OK Mono C# TESTS 64 483 38707200 1700
45341075 stipeja3 D Nov. 5, 2018, 8:52 p.m. OK Mono C# TESTS 64 530 47001600 1700
45341010 stipeja3 D Nov. 5, 2018, 8:49 p.m. OK Mono C# TESTS 64 545 47001600 1700
45340967 stipeja3 D Nov. 5, 2018, 8:46 p.m. OK Mono C# TESTS 64 545 60928000 1700
45336562 mannik D Nov. 5, 2018, 5:58 p.m. OK Mono C# TESTS 64 576 55603200 1700
51420740 nemars D March 17, 2019, 4:22 p.m. OK Mono C# TESTS 64 670 47718400 1700
42495028 JohnSmith65536 D Sept. 5, 2018, 1:57 p.m. OK Mono C# TESTS 64 670 53657600 1700
66101046 vjudge2 D Dec. 1, 2019, 8:26 a.m. OK MS C++ TESTS 64 93 6656000 1700
66089128 vjudge2 D Dec. 1, 2019, 6:32 a.m. OK MS C++ TESTS 64 109 9728000 1700
66088219 vjudge4 D Dec. 1, 2019, 6:06 a.m. OK MS C++ TESTS 64 109 16076800 1700
42432841 scorpiowf D Sept. 3, 2018, 3:42 p.m. OK MS C++ TESTS 64 140 9216000 1700
69387331 vjudge3 D Jan. 23, 2020, 12:07 a.m. OK MS C++ TESTS 64 155 12083200 1700
45271059 vjudge2 D Nov. 4, 2018, 8:32 a.m. OK MS C++ TESTS 64 155 12800000 1700
46027223 vjudge4 D Nov. 21, 2018, 11:55 a.m. OK MS C++ TESTS 64 155 15564800 1700
44397052 24khandsome D Oct. 16, 2018, 11:18 a.m. OK MS C++ TESTS 64 156 11468800 1700
46055319 vjudge3 D Nov. 22, 2018, 10:35 a.m. OK MS C++ TESTS 64 156 11468800 1700
66089594 vjudge3 D Dec. 1, 2019, 6:45 a.m. OK MS C++ TESTS 64 156 12697600 1700
58943954 olafenok D Aug. 17, 2019, 8:08 a.m. OK MS C++ 2017 TESTS 64 124 12595200 1700
62925689 pmitkov D Oct. 19, 2019, 11:16 a.m. OK MS C++ 2017 TESTS 64 218 13516800 1700
68843965 vjudge1 D Jan. 15, 2020, 6:46 a.m. OK MS C++ 2017 TESTS 64 249 10444800 1700
51900969 saturn2019 D March 27, 2019, 1:29 p.m. OK MS C++ 2017 TESTS 64 280 13516800 1700
66166088 vjudge5 D Dec. 2, 2019, 7:41 a.m. OK MS C++ 2017 TESTS 64 436 11366400 1700
67765591 yuanyuan2048 D Dec. 28, 2019, 3:28 a.m. OK MS C++ 2017 TESTS 64 499 9830400 1700
52717340 Still_Theory D April 13, 2019, 5:57 p.m. OK MS C++ 2017 TESTS 64 530 16998400 1700
51470015 EnderXiao D March 19, 2019, 5:48 a.m. OK MS C++ 2017 TESTS 64 546 10649600 1700
69730817 IPRIT D Jan. 29, 2020, 1:29 p.m. OK MS C++ 2017 TESTS 64 561 19456000 1700
55947389 darkus-_- D June 22, 2019, 8:55 p.m. OK MS C++ 2017 TESTS 64 623 23449600 1700
49053801 W_Szymanski D Jan. 27, 2019, 12:22 p.m. OK Ocaml TESTS 64 390 23756800 1700
42696523 CTC D Sept. 9, 2018, 7:34 a.m. OK PHP TESTS 64 1434 129843200 1700
42418074 YESMAths D Sept. 3, 2018, 8:28 a.m. OK PyPy 2 TESTS 64 779 50483200 1700
47959582 c1729 D Jan. 5, 2019, 8:36 a.m. OK PyPy 2 TESTS 64 873 80998400 1700
42418016 YESMAths D Sept. 3, 2018, 8:26 a.m. OK PyPy 2 TESTS 64 904 51916800 1700
42546949 pavankatta D Sept. 6, 2018, 9:38 a.m. OK PyPy 2 TESTS 64 967 43212800 1700
42445825 Butane D Sept. 4, 2018, 3:08 a.m. OK PyPy 2 TESTS 64 1123 53657600 1700
43281159 kd710306 D Sept. 23, 2018, 5:23 a.m. OK PyPy 2 TESTS 64 1201 43315200 1700
44736417 test616.cpp D Oct. 23, 2018, 1 p.m. OK PyPy 2 TESTS 64 1326 31232000 1700
57980513 deadguy D July 30, 2019, 9:13 a.m. OK PyPy 2 TESTS 64 1356 31641600 1700
48705954 soumyasarkar1998 D Jan. 22, 2019, 5:54 a.m. OK PyPy 2 TESTS 64 1434 33587200 1700
45546951 omarnvidia D Nov. 11, 2018, 2:48 a.m. OK PyPy 3 TESTS 64 826 50073600 1700
42720028 Stephan D Sept. 9, 2018, 11:10 p.m. OK PyPy 3 TESTS 64 904 37990400 1700
42444015 Stephan D Sept. 4, 2018, 12:47 a.m. OK PyPy 3 TESTS 64 904 38092800 1700
43271710 LordVader D Sept. 22, 2018, 7:19 p.m. OK PyPy 3 TESTS 64 1029 66457600 1700
42416519 IamChtholly D Sept. 3, 2018, 7:29 a.m. OK PyPy 3 TESTS 64 1715 30515200 1700
42443735 Stephan D Sept. 4, 2018, 12:22 a.m. OK PyPy 3 TESTS 64 1840 41984000 1700
42443652 Stephan D Sept. 4, 2018, 12:14 a.m. OK PyPy 3 TESTS 64 1855 40960000 1700
42443413 Stephan D Sept. 3, 2018, 11:49 p.m. OK PyPy 3 TESTS 64 1856 42496000 1700
42443311 Stephan D Sept. 3, 2018, 11:39 p.m. OK PyPy 3 TESTS 64 1871 42393600 1700
42443478 Stephan D Sept. 3, 2018, 11:54 p.m. OK PyPy 3 TESTS 64 1872 41164800 1700
42459322 nwi D Sept. 4, 2018, 12:59 p.m. OK Python 2 TESTS 64 810 32665600 1700
45586947 Jonasz D Nov. 12, 2018, 9:28 a.m. OK Python 2 TESTS 64 1138 34508800 1700
44736513 test616.cpp D Oct. 23, 2018, 1:02 p.m. OK Python 2 TESTS 64 1138 38400000 1700
48491908 noob77777 D Jan. 17, 2019, 11:18 a.m. OK Python 2 TESTS 64 1263 57139200 1700
43579378 SerChirag D Sept. 29, 2018, 4:38 p.m. OK Python 2 TESTS 64 1762 48742400 1700
48975602 toysheeyeyraku D Jan. 26, 2019, 9:20 a.m. OK Python 3 TESTS 64 951 47411200 1700
68776045 sherlock8696 D Jan. 14, 2020, 1:28 p.m. OK Python 3 TESTS 64 966 45875200 1700
49186582 FlyingBag65 D Jan. 30, 2019, 6:22 a.m. OK Python 3 TESTS 64 982 47820800 1700
49522467 varun_raj D Feb. 6, 2019, 9:02 a.m. OK Python 3 TESTS 64 997 53555200 1700
44831767 Vasiliy_48 D Oct. 25, 2018, 8:47 a.m. OK Python 3 TESTS 64 998 37683200 1700
65614544 Dandan1212 D Nov. 24, 2019, 2:30 a.m. OK Python 3 TESTS 64 1044 53555200 1700
51602430 ccc612 D March 21, 2019, 5:08 a.m. OK Python 3 TESTS 64 1123 53350400 1700
42444008 Stephan D Sept. 4, 2018, 12:47 a.m. OK Python 3 TESTS 64 1170 33177600 1700
42488548 Mo_Ga D Sept. 5, 2018, 10:43 a.m. OK Python 3 TESTS 64 1200 34713600 1700
46021677 Firepaw D Nov. 21, 2018, 8:32 a.m. OK Python 3 TESTS 64 1231 52428800 1700
42850242 Caporegime. D Sept. 14, 2018, 4:46 a.m. OK Ruby TESTS 64 1341 43315200 1700
65318893 tuna_salad D Nov. 18, 2019, 6:44 p.m. OK Rust TESTS 64 124 15360000 1700

remove filters

Back to search problems