Codeforces Round 637 (Div. 1) - Thanks, Ivan Belonogov!

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
1340 Codeforces Round 637 (Div. 1) - Thanks, Ivan Belonogov! FINISHED False 9000 144170099 April 23, 2020, 2:45 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 995 ) D Nastya and Time Machine PROGRAMMING constructive algorithms dfs and similar graphs trees

B" Denis came to Nastya and discovered that she was not happy to see him... There is only one chance that she can become happy. Denis wants to buy all things that Nastya likes so she will certainly agree to talk to him. The map of the city where they live has a lot of squares, some of which are connected by roads. There is exactly one way between each pair of squares which does not visit any vertex twice. It turns out that the graph of the city is a tree. Denis is located at vertex 1 at the time 0 . He wants to visit every vertex at least once and get back as soon as possible. Denis can walk one road in 1 time. Unfortunately, the city is so large that it will take a very long time to visit all squares. Therefore, Denis took a desperate step. He pulled out his pocket time machine, which he constructed in his basement. With its help, Denis can change the time to any non-negative time, which is less than the current time. But the time machine has one feature. If the hero finds himself in the same place and at the same time twice, there will be an explosion of universal proportions and Nastya will stay unhappy. Therefore, Denis asks you to find him a route using a time machine that he will get around all squares and will return to the first and at the same time the maximum time in which he visited any square will be minimal. Formally, Denis's route can be represented as a sequence of pairs: {v_1, t_1 }, {v_2, t_2 }, {v_3, t_3 }, ldots, {v_k, t_k } , where v_i is number of square, and t_i is time in which the boy is now. The following conditions must be met: You need to find a route such that the maximum time in any square will be minimal, that is, the route for which max{(t_1, t_2, ldots, t_k)} will be the minimum possible. The first line contains a single integer n (1 <= q n <= q 10^5) -- the number of squares in the city. The next n - 1 lines contain two integers u and v (1 l"...

Tutorials

Codeforces Round #637 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
77825501 hos.lyric D April 23, 2020, 4:08 p.m. OK D TESTS 80 311 24268800
77861886 LJC00118 D April 23, 2020, 11:50 p.m. OK GNU C++11 TESTS 80 62 10240000
77892136 xht37 D April 24, 2020, 8:13 a.m. OK GNU C++11 TESTS 80 62 14848000
77968388 p_b_p_b D April 25, 2020, 2:03 a.m. OK GNU C++11 TESTS 80 108 32768000
77998990 Frame233 D April 25, 2020, 8:44 a.m. OK GNU C++11 TESTS 80 109 8806400
77874971 suncongbo D April 24, 2020, 4:40 a.m. OK GNU C++11 TESTS 80 109 9420800
77839268 msuwakow D April 23, 2020, 4:40 p.m. OK GNU C++11 TESTS 80 109 10342400
77876507 qazswedx2 D April 24, 2020, 5:03 a.m. OK GNU C++11 TESTS 80 109 12800000
77973998 howardyang D April 25, 2020, 4:21 a.m. OK GNU C++11 TESTS 80 109 30412800
77896066 wygz D April 24, 2020, 9 a.m. OK GNU C++11 TESTS 80 124 8806400
77867313 EricHuang2003 D April 24, 2020, 2:28 a.m. OK GNU C++11 TESTS 80 124 8806400
77847575 NotaMotuaQAQ D April 23, 2020, 5:02 p.m. OK GNU C++14 TESTS 80 78 14643200
77894214 skywalkert D April 24, 2020, 8:39 a.m. OK GNU C++14 TESTS 80 139 12083200
77989445 spacewalker D April 25, 2020, 7:38 a.m. OK GNU C++14 TESTS 80 140 10342400
77965367 OTTFF D April 25, 2020, 12:27 a.m. OK GNU C++14 TESTS 80 140 10342400
77964347 Lius D April 24, 2020, 11:52 p.m. OK GNU C++14 TESTS 80 140 10342400
77836226 wucstdio D April 23, 2020, 4:33 p.m. OK GNU C++14 TESTS 80 140 10956800
77964702 halfblindprince D April 25, 2020, 12:05 a.m. OK GNU C++14 TESTS 80 140 11571200
77867664 kimnait D April 24, 2020, 2:36 a.m. OK GNU C++14 TESTS 80 140 12083200
77874509 beginend D April 24, 2020, 4:33 a.m. OK GNU C++14 TESTS 80 140 12492800
77844462 Motarack D April 23, 2020, 4:54 p.m. OK GNU C++14 TESTS 80 155 4096000
77891024 liouzhou_101 D April 24, 2020, 8:01 a.m. OK GNU C++17 TESTS 80 93 13721600
77860402 Ronnie007 D April 23, 2020, 11:07 p.m. OK GNU C++17 TESTS 80 124 10444800
77841408 littlelittlehorse D April 23, 2020, 4:46 p.m. OK GNU C++17 TESTS 80 124 11366400
77831306 9baka_Cirno D April 23, 2020, 4:21 p.m. OK GNU C++17 TESTS 80 124 13004800
77968224 dragonslayerintraining D April 25, 2020, 1:57 a.m. OK GNU C++17 TESTS 80 139 10342400
77859843 KevinWan D April 23, 2020, 10:53 p.m. OK GNU C++17 TESTS 80 139 10649600
77963786 imbr92 D April 24, 2020, 11:33 p.m. OK GNU C++17 TESTS 80 139 11264000
77865257 Nachia D April 24, 2020, 1:35 a.m. OK GNU C++17 TESTS 80 139 11264000
77832420 Batrr D April 23, 2020, 4:24 p.m. OK GNU C++17 TESTS 80 139 22937600
77937532 Elegia D April 24, 2020, 4:41 p.m. OK GNU C++17 TESTS 80 140 10342400
77990280 achvanov D April 25, 2020, 7:47 a.m. OK GNU C++17 (64) TESTS 80 124 12595200
77956885 hltk D April 24, 2020, 8:52 p.m. OK GNU C++17 (64) TESTS 80 124 12595200
77858858 risujiroh D April 23, 2020, 10:29 p.m. OK GNU C++17 (64) TESTS 80 124 12595200
77882376 compute D April 24, 2020, 6:19 a.m. OK GNU C++17 (64) TESTS 80 124 12697600
77846877 Slamur D April 23, 2020, 5 p.m. OK GNU C++17 (64) TESTS 80 124 13004800
77884557 860579 D April 24, 2020, 6:44 a.m. OK GNU C++17 (64) TESTS 80 139 12595200
77856870 neal D April 23, 2020, 9:55 p.m. OK GNU C++17 (64) TESTS 80 139 12595200
77818222 jiangly D April 23, 2020, 3:53 p.m. OK GNU C++17 (64) TESTS 80 139 12595200
77814886 ecnerwala D April 23, 2020, 3:46 p.m. OK GNU C++17 (64) TESTS 80 139 12595200
77838146 smeke D April 23, 2020, 4:38 p.m. OK GNU C++17 (64) TESTS 80 139 12800000
77930355 Xylenox D April 24, 2020, 3:34 p.m. OK Java 8 TESTS 80 420 33792000
77843675 Harpae D April 23, 2020, 4:52 p.m. OK Java 8 TESTS 80 467 36659200
77844758 SecondThread D April 23, 2020, 4:55 p.m. OK Java 8 TESTS 80 529 31641600
77842290 Tlatoani D April 23, 2020, 4:48 p.m. OK Kotlin TESTS 80 623 63180800
77844730 pajenegod D April 23, 2020, 4:54 p.m. OK PyPy 2 TESTS 80 452 47616000
77878708 EbTech D April 24, 2020, 5:34 a.m. OK Rust TESTS 80 109 10137600

remove filters

Back to search problems