Codeforces Round 536 (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
1106 Codeforces Round 536 (Div. 2) FINISHED False 9600 188587523 Jan. 31, 2019, 12:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 15275 ) D Lunar New Year and a Wander PROGRAMMING data structures dfs and similar graphs greedy shortest paths 1500

B"Lunar New Year is approaching, and Bob decides to take a wander in a nearby park. The park can be represented as a connected graph with n nodes and m bidirectional edges. Initially Bob is at the node 1 and he records 1 on his notebook. He can wander from one node to another through those bidirectional edges. Whenever he visits a node not recorded on his notebook, he records it. After he visits all nodes at least once, he stops wandering, thus finally a permutation of nodes a_1, a_2, ldots, a_n is recorded. Wandering is a boring thing, but solving problems is fascinating. Bob wants to know the lexicographically smallest sequence of nodes he can record while wandering. Bob thinks this problem is trivial, and he wants you to solve it. A sequence x is lexicographically smaller than a sequence y if and only if one of the following holds: The first line contains two positive integers n and m ( 1 <= q n, m <= q 10^5 ), denoting the number of nodes and edges, respectively. The following m lines describe the bidirectional edges in the graph. The i -th of these lines contains two integers u_i and v_i ( 1 <= q u_i, v_i <= q n ), representing the nodes the i -th edge connects. Note that the graph can have multiple edges connecting the same two nodes and self-loops. It is guaranteed that the graph is connected. Output a line containing the lexicographically smallest sequence a_1, a_2, ldots, a_n Bob can record. In the first sample, Bob's optimal wandering path could be 1 rightarrow 2 rightarrow 1 rightarrow 3 . Therefore, Bob will obtain the sequence {1, 2, 3 } , which is the lexicographically smallest one. In the second sample, Bob's optimal wandering path could be 1 rightarrow 4 rightarrow 3 rightarrow 2 rightarrow 3 rightarrow 4 rightarrow 1 rightarrow 5 . Therefore, Bob will obtain the sequence {1, 4, 3, 2, 5 } , which is the lexicograp"...

Tutorials

Tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
49392329 aboAdnan D Feb. 3, 2019, 10:39 a.m. OK Clang++17 Diagnostics TESTS 53 608 27648000 1500
50342041 yafngzh D Feb. 23, 2019, 3:14 a.m. OK Clang++17 Diagnostics TESTS 53 2636 39424000 1500
49272010 nanae1914 D Jan. 31, 2019, 2:13 p.m. OK D TESTS 53 187 17510400 1500
52597449 chaorenhaha D April 11, 2019, 9:56 a.m. OK FPC TESTS 53 358 5120000 1500
49667853 luogu_bot3 D Feb. 9, 2019, 3:18 p.m. OK FPC TESTS 53 358 5120000 1500
59898902 luogu_bot5 D Sept. 2, 2019, 1:02 p.m. OK FPC TESTS 53 374 3174400 1500
49267644 PhuongPeu D Jan. 31, 2019, 1:50 p.m. OK FPC TESTS 53 374 10547200 1500
67767206 vjudge1 D Dec. 28, 2019, 4:49 a.m. OK GNU C11 TESTS 53 421 9420800 1500
49276364 rainboy D Jan. 31, 2019, 2:39 p.m. OK GNU C11 TESTS 53 468 7372800 1500
49320289 luogu_bot5 D Feb. 1, 2019, 12:01 p.m. OK GNU C++11 TESTS 53 46 3174400 1500
49298186 qjzTreeZ D Feb. 1, 2019, 12:44 a.m. OK GNU C++11 TESTS 53 46 3174400 1500
49329378 qnickx D Feb. 1, 2019, 3:31 p.m. OK GNU C++11 TESTS 53 46 3174400 1500
49444726 ChthollyNotaSeniorious D Feb. 4, 2019, 1:38 a.m. OK GNU C++11 TESTS 53 46 3174400 1500
54382081 luogu_bot4 D May 19, 2019, 11:26 a.m. OK GNU C++11 TESTS 53 46 3481600 1500
49299090 luogu_bot4 D Feb. 1, 2019, 1:32 a.m. OK GNU C++11 TESTS 53 46 3686400 1500
64074599 luogu_bot5 D Nov. 2, 2019, 8:26 a.m. OK GNU C++11 TESTS 53 46 3891200 1500
49446845 luogu_bot5 D Feb. 4, 2019, 4:01 a.m. OK GNU C++11 TESTS 53 46 3891200 1500
49310072 PresHerobrine D Feb. 1, 2019, 7:27 a.m. OK GNU C++11 TESTS 53 46 4608000 1500
49270837 ChthollyNotaSeniorious D Jan. 31, 2019, 2:07 p.m. OK GNU C++11 TESTS 53 46 6758400 1500
53834756 Luwei_ D May 7, 2019, 1:18 a.m. OK GNU C++14 TESTS 53 62 3891200 1500
49269142 sewage D Jan. 31, 2019, 1:58 p.m. OK GNU C++14 TESTS 53 77 244940800 1500
57623844 vjudge1 D July 24, 2019, 6:13 a.m. OK GNU C++14 TESTS 53 78 3174400 1500
50709611 ecjtu18-1224 D March 3, 2019, 6:11 a.m. OK GNU C++14 TESTS 53 78 3276800 1500
57624430 vjudge1 D July 24, 2019, 6:28 a.m. OK GNU C++14 TESTS 53 78 3481600 1500
50142845 cloudsky01 D Feb. 19, 2019, 12:13 a.m. OK GNU C++14 TESTS 53 78 3481600 1500
49323019 lfw D Feb. 1, 2019, 1:04 p.m. OK GNU C++14 TESTS 53 78 3584000 1500
50264497 TargetLocked D Feb. 21, 2019, 3:39 a.m. OK GNU C++14 TESTS 53 78 3584000 1500
49442770 Againstmoon D Feb. 3, 2019, 10:41 p.m. OK GNU C++14 TESTS 53 78 3584000 1500
50090924 rainclemareye D Feb. 18, 2019, 10:18 a.m. OK GNU C++14 TESTS 53 78 3891200 1500
49901495 .tx D Feb. 14, 2019, 9:37 a.m. OK GNU C++17 TESTS 53 62 5120000 1500
49269841 Trisolaris D Jan. 31, 2019, 2:02 p.m. OK GNU C++17 TESTS 53 62 7372800 1500
49307072 stdKonjac D Feb. 1, 2019, 6:13 a.m. OK GNU C++17 TESTS 53 78 3481600 1500
51359538 liexss D March 16, 2019, 6:32 a.m. OK GNU C++17 TESTS 53 78 3584000 1500
51360179 vjudge3 D March 16, 2019, 6:51 a.m. OK GNU C++17 TESTS 53 78 3584000 1500
60438996 kaike D Sept. 12, 2019, 11:46 a.m. OK GNU C++17 TESTS 53 78 3891200 1500
57625957 vjudge5 D July 24, 2019, 7:02 a.m. OK GNU C++17 TESTS 53 78 4096000 1500
49303484 fishfree88 D Feb. 1, 2019, 4:39 a.m. OK GNU C++17 TESTS 53 78 4300800 1500
53273061 Abdulrahman_MJ D April 25, 2019, 7:41 a.m. OK GNU C++17 TESTS 53 78 5222400 1500
51360194 vjudge3 D March 16, 2019, 6:51 a.m. OK GNU C++17 TESTS 53 78 5734400 1500
49271657 life_is_not_bed_of_roses D Jan. 31, 2019, 2:11 p.m. OK Go TESTS 53 265 19763200 1500
49483069 2008061626 D Feb. 5, 2019, 1:51 a.m. OK Go TESTS 53 530 5222400 1500
49278259 2008061626 D Jan. 31, 2019, 2:55 p.m. OK Go TESTS 53 560 15257600 1500
49276853 dongy D Jan. 31, 2019, 2:43 p.m. OK Go TESTS 53 1028 33280000 1500
49344306 gksato D Feb. 2, 2019, 4:06 a.m. OK Haskell TESTS 53 171 20172800 1500
49286499 gksato D Jan. 31, 2019, 5:54 p.m. OK Haskell TESTS 53 171 64921600 1500
69433379 jakejase2 D Jan. 23, 2020, 6:04 p.m. OK Java 11 TESTS 53 343 17817600 1500
63944706 shubh_jha98 D Oct. 31, 2019, 6:31 p.m. OK Java 11 TESTS 53 733 25702400 1500
67065769 samuelbohl D Dec. 17, 2019, 11:02 a.m. OK Java 11 TESTS 53 1045 16486400 1500
49299404 aman28rwt D Feb. 1, 2019, 1:47 a.m. OK Java 8 TESTS 53 171 0 1500
49271792 xodiac D Jan. 31, 2019, 2:12 p.m. OK Java 8 TESTS 53 202 23449600 1500
50550094 RasMalai D Feb. 27, 2019, 3:11 a.m. OK Java 8 TESTS 53 248 16588800 1500
49320407 ShowStopper728 D Feb. 1, 2019, 12:04 p.m. OK Java 8 TESTS 53 249 16179200 1500
49603369 tsumit023 D Feb. 7, 2019, 6:13 p.m. OK Java 8 TESTS 53 249 16486400 1500
49474584 typedef_2000 D Feb. 4, 2019, 6:44 p.m. OK Java 8 TESTS 53 264 16691200 1500
60380883 Anonymous9 D Sept. 11, 2019, 9:06 a.m. OK Java 8 TESTS 53 264 16793600 1500
49466819 jenish9599 D Feb. 4, 2019, 3:26 p.m. OK Java 8 TESTS 53 265 16793600 1500
54509692 Seco_seco D May 23, 2019, 6:24 a.m. OK Java 8 TESTS 53 280 16076800 1500
57760763 hasan5788 D July 25, 2019, 5:55 p.m. OK Java 8 TESTS 53 280 17100800 1500
49955530 glider.g D Feb. 15, 2019, 3:52 p.m. OK Kotlin TESTS 53 483 16691200 1500
50608579 Lishy2010 D Feb. 28, 2019, 3:46 p.m. OK Kotlin TESTS 53 654 18432000 1500
49288191 spookywooky D Jan. 31, 2019, 6:24 p.m. OK Kotlin TESTS 53 951 61542400 1500
49369086 Quaternion D Feb. 2, 2019, 4:30 p.m. OK Kotlin TESTS 53 1091 16793600 1500
55399099 og.kostya D June 10, 2019, 1:12 p.m. OK Mono C# TESTS 53 139 9523200 1500
55202562 camypaper D June 6, 2019, 11:13 a.m. OK Mono C# TESTS 53 233 26521600 1500
49457967 selpo D Feb. 4, 2019, 11:24 a.m. OK Mono C# TESTS 53 280 20070400 1500
51224377 nemars D March 12, 2019, 1:34 p.m. OK Mono C# TESTS 53 327 21708800 1500
49458014 selpo D Feb. 4, 2019, 11:26 a.m. OK Mono C# TESTS 53 342 21196800 1500
49821732 treasuryonly D Feb. 12, 2019, 9:16 a.m. OK Mono C# TESTS 53 342 25292800 1500
49263502 eki D Jan. 31, 2019, 1:27 p.m. OK Mono C# TESTS 53 545 22732800 1500
49394256 dpkun D Feb. 3, 2019, 11:43 a.m. OK Mono C# TESTS 53 623 18841600 1500
49282118 fr0st D Jan. 31, 2019, 4:49 p.m. OK Mono C# TESTS 53 686 93286400 1500
49314404 vjudge2 D Feb. 1, 2019, 9:39 a.m. OK MS C++ TESTS 53 77 4198400 1500
49267383 asdkjc D Jan. 31, 2019, 1:49 p.m. OK MS C++ TESTS 53 77 8294400 1500
50681979 CodeZYQ D March 2, 2019, 11:55 a.m. OK MS C++ TESTS 53 78 5222400 1500
49265027 lmyy0862 D Jan. 31, 2019, 1:35 p.m. OK MS C++ TESTS 53 78 7782400 1500
50688354 vjudge1 D March 2, 2019, 2:34 p.m. OK MS C++ TESTS 53 93 5222400 1500
49298936 Houbunsha D Feb. 1, 2019, 1:24 a.m. OK MS C++ TESTS 53 93 5632000 1500
51358159 vjudge3 D March 16, 2019, 5:41 a.m. OK MS C++ TESTS 53 93 5939200 1500
54526019 vjudge3 D May 23, 2019, 2:32 p.m. OK MS C++ TESTS 53 93 6041600 1500
54655768 vjudge4 D May 26, 2019, 8:15 a.m. OK MS C++ TESTS 53 93 6041600 1500
57172128 vjudge3 D July 17, 2019, 3:45 a.m. OK MS C++ TESTS 53 93 6246400 1500
49310260 hwangganzi D Feb. 1, 2019, 7:32 a.m. OK MS C++ 2017 TESTS 53 109 5120000 1500
64350764 Lecxcy D Nov. 6, 2019, 8:15 a.m. OK MS C++ 2017 TESTS 53 124 6246400 1500
63281947 AleksanderBalobanov D Oct. 24, 2019, 8:59 a.m. OK MS C++ 2017 TESTS 53 140 9318400 1500
51379151 petko_mitkov D March 16, 2019, 3:26 p.m. OK MS C++ 2017 TESTS 53 187 8806400 1500
65023398 despairrr D Nov. 15, 2019, 6:26 a.m. OK MS C++ 2017 TESTS 53 218 5427200 1500
64348345 yuanyuan2048 D Nov. 6, 2019, 7:20 a.m. OK MS C++ 2017 TESTS 53 249 4812800 1500
52463965 wellox D April 7, 2019, 2:38 p.m. OK MS C++ 2017 TESTS 53 249 5427200 1500
49272023 DavitMarg D Jan. 31, 2019, 2:14 p.m. OK MS C++ 2017 TESTS 53 249 9420800 1500
56304526 poormate D June 30, 2019, 10:57 a.m. OK MS C++ 2017 TESTS 53 264 4812800 1500
49386170 path7inder D Feb. 3, 2019, 7:01 a.m. OK MS C++ 2017 TESTS 53 264 5836800 1500
53426115 ssdh233 D April 27, 2019, 1:41 p.m. OK Node.js TESTS 53 421 38400000 1500
49401915 mayakin D Feb. 3, 2019, 3:12 p.m. OK PHP TESTS 53 577 56320000 1500
49272320 c1729 D Jan. 31, 2019, 2:15 p.m. OK PyPy 2 TESTS 53 452 40345600 1500
49273553 frederika D Jan. 31, 2019, 2:22 p.m. OK PyPy 2 TESTS 53 546 48640000 1500
49321603 Zeyu D Feb. 1, 2019, 12:32 p.m. OK PyPy 2 TESTS 53 888 27545600 1500
49296747 gatsko D Jan. 31, 2019, 11:43 p.m. OK PyPy 2 TESTS 53 936 43110400 1500
49296551 gatsko D Jan. 31, 2019, 11:30 p.m. OK PyPy 2 TESTS 53 1029 24985600 1500
55855625 anshuman16423 D June 21, 2019, 6:50 a.m. OK PyPy 2 TESTS 53 1824 17100800 1500
49984317 shehebe D Feb. 16, 2019, 9:48 a.m. OK PyPy 2 TESTS 53 1825 19148800 1500
49294315 adshin21 D Jan. 31, 2019, 9:15 p.m. OK PyPy 3 TESTS 53 498 20582400 1500
54075564 bkalra92 D May 13, 2019, 7:37 p.m. OK PyPy 3 TESTS 53 514 18944000 1500
49269460 htkb D Jan. 31, 2019, 2 p.m. OK PyPy 3 TESTS 53 514 39321600 1500
49270270 rookzeno D Jan. 31, 2019, 2:04 p.m. OK PyPy 3 TESTS 53 529 40345600 1500
49478166 Stephan D Feb. 4, 2019, 8:37 p.m. OK PyPy 3 TESTS 53 530 19251200 1500
49295367 EA5 D Jan. 31, 2019, 10:05 p.m. OK PyPy 3 TESTS 53 560 32153600 1500
58095206 chaudhary_19 D July 31, 2019, 7:23 p.m. OK PyPy 3 TESTS 53 577 22425600 1500
49267037 Mukundan314 D Jan. 31, 2019, 1:47 p.m. OK PyPy 3 TESTS 53 608 49868800 1500
49614244 yellowflash D Feb. 8, 2019, 4:51 a.m. OK PyPy 3 TESTS 53 1076 18636800 1500
49459455 yfo D Feb. 4, 2019, 12:13 p.m. OK PyPy 3 TESTS 53 1107 18944000 1500
55072778 shubhankarsharma00 D June 4, 2019, 7:07 a.m. OK Python 2 TESTS 53 935 13312000 1500
49527493 Leendertz D Feb. 6, 2019, 12:11 p.m. OK Python 3 TESTS 53 607 31948800 1500
49640735 siletWorker D Feb. 8, 2019, 9:42 p.m. OK Python 3 TESTS 53 639 13619200 1500
49285987 yaqizhang D Jan. 31, 2019, 5:46 p.m. OK Python 3 TESTS 53 639 36556800 1500
49295353 EA5 D Jan. 31, 2019, 10:04 p.m. OK Python 3 TESTS 53 654 22835200 1500
58095186 chaudhary_19 D July 31, 2019, 7:22 p.m. OK Python 3 TESTS 53 655 15257600 1500
49268107 Regius D Jan. 31, 2019, 1:53 p.m. OK Python 3 TESTS 53 670 21913600 1500
49286304 renjied D Jan. 31, 2019, 5:51 p.m. OK Python 3 TESTS 53 670 27238400 1500
53178658 gaidash D April 23, 2019, 6:10 a.m. OK Python 3 TESTS 53 686 12492800 1500
68407191 nealzane D Jan. 8, 2020, 3:26 p.m. OK Python 3 TESTS 53 686 16588800 1500
49270695 titia D Jan. 31, 2019, 2:06 p.m. OK Python 3 TESTS 53 701 26009600 1500
49482519 rahdpp D Feb. 5, 2019, 12:51 a.m. OK Ruby TESTS 53 1263 25088000 1500
49464636 ancv1990 D Feb. 4, 2019, 2:32 p.m. OK Rust TESTS 53 78 6144000 1500
49632992 kobae964 D Feb. 8, 2019, 5:09 p.m. OK Rust TESTS 53 140 5427200 1500
49262433 yakamoto D Jan. 31, 2019, 1:21 p.m. OK Scala TESTS 53 592 44236800 1500

remove filters

Back to search problems