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 |
|---|---|---|---|---|---|---|
| 650 | Codeforces Round 345 (Div. 1) | FINISHED | False | 7200 | 319062923 | March 7, 2016, 9:25 a.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 678 ) | E | Clockwork Bomb | PROGRAMMING | data structures dfs and similar dsu greedy trees | 3100 |
My name is James diGriz, I'm the most clever robber and treasure hunter in the whole galaxy. There are books written about my adventures and songs about my operations, though you were able to catch me up in a pretty awkward moment. I was able to hide from cameras, outsmart all the guards and pass numerous traps, but when I finally reached the treasure box and opened it, I have accidentally started the clockwork bomb! Luckily, I have met such kind of bombs before and I know that the clockwork mechanism can be stopped by connecting contacts with wires on the control panel of the bomb in a certain manner. I see n contacts connected by n - 1 wires. Contacts are numbered with integers from 1 to n . Bomb has a security mechanism that ensures the following condition: if there exist k ≥ 2 contacts c 1 , c 2 , ..., c k forming a circuit, i. e. there exist k distinct wires between contacts c 1 and c 2 , c 2 and c 3 , ... , c k and c 1 , then the bomb immediately explodes and my story ends here. In particular, if two contacts are connected by more than one wire they form a circuit of length 2 . It is also prohibited to connect a contact with itself. On the other hand, if I disconnect more than one wire (i. e. at some moment there will be no more than n - 2 wires in the scheme) then the other security check fails and the bomb also explodes. So, the only thing I can do is to unplug some wire and plug it into a new place ensuring the fact that no circuits appear. I know how I should put the wires in order to stop the clockwork. But my time is running out! Help me get out of this alive: find the sequence of operations each of which consists of unplugging some wire and putting it into another place so that the bomb is defused. The first line of the input contains n ( 2 ≤ n ≤ 500 000 ), the number of contacts. Each of the following n - 1 lines contains two of integers x i and y i ( 1 ≤ x i , y i ≤ n , x i ≠ y i ) denoting the contacts currently connected by the i -th wire. |
| Codeforces Round #345: editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 27356552 | zhan8855 | E | May 26, 2017, 1:35 p.m. | OK | GNU C++ | TESTS | 89 | 467 | 56524800 | 3100 | |
| 31524506 | vjudge2 | E | Oct. 20, 2017, 5:54 a.m. | OK | GNU C++ | TESTS | 89 | 561 | 72704000 | 3100 | |
| 40100663 | X_o_r | E | July 9, 2018, 4:56 a.m. | OK | GNU C++ | TESTS | 89 | 592 | 65843200 | 3100 | |
| 18162954 | Lightning34 | E | May 31, 2016, 2:43 a.m. | OK | GNU C++ | TESTS | 89 | 592 | 84172800 | 3100 | |
| 35733095 | Worldwide_D | E | Feb. 26, 2018, 1:20 p.m. | OK | GNU C++ | TESTS | 89 | 608 | 67174400 | 3100 | |
| 31524509 | nn020701 | E | Oct. 20, 2017, 5:55 a.m. | OK | GNU C++ | TESTS | 89 | 608 | 72704000 | 3100 | |
| 17070299 | vjudge5 | E | March 31, 2016, 9:07 a.m. | OK | GNU C++ | TESTS | 89 | 654 | 45977600 | 3100 | |
| 16664129 | brainyuan77 | E | March 12, 2016, 3:08 a.m. | OK | GNU C++ | TESTS | 89 | 685 | 43827200 | 3100 | |
| 16612914 | Chloe_fan | E | March 9, 2016, 7:54 a.m. | OK | GNU C++ | TESTS | 89 | 685 | 43827200 | 3100 | |
| 27356157 | zhan8855 | E | May 26, 2017, 1:11 p.m. | OK | GNU C++ | TESTS | 89 | 701 | 56524800 | 3100 | |
| 63041461 | lslzf | E | Oct. 21, 2019, 1:10 a.m. | OK | GNU C++11 | TESTS | 89 | 498 | 58060800 | 3100 | |
| 63225841 | 520Enterprise | E | Oct. 23, 2019, 9:17 a.m. | OK | GNU C++11 | TESTS | 89 | 498 | 70656000 | 3100 | |
| 35725681 | crazy_cloud | E | Feb. 26, 2018, 9:02 a.m. | OK | GNU C++11 | TESTS | 89 | 545 | 32768000 | 3100 | |
| 63242698 | wsk1202 | E | Oct. 23, 2019, 1:52 p.m. | OK | GNU C++11 | TESTS | 89 | 545 | 45875200 | 3100 | |
| 40984750 | ReaLNero1 | E | July 30, 2018, 7:33 p.m. | OK | GNU C++11 | TESTS | 89 | 561 | 30617600 | 3100 | |
| 57068075 | hsl2363 | E | July 15, 2019, 12:16 a.m. | OK | GNU C++11 | TESTS | 89 | 561 | 60006400 | 3100 | |
| 31522503 | PupilFop_zz | E | Oct. 20, 2017, 3:10 a.m. | OK | GNU C++11 | TESTS | 89 | 561 | 94924800 | 3100 | |
| 34290309 | samjia2000 | E | Jan. 19, 2018, 3:10 a.m. | OK | GNU C++11 | TESTS | 89 | 576 | 50176000 | 3100 | |
| 17272374 | Dirak | E | April 10, 2016, 11:44 p.m. | OK | GNU C++11 | TESTS | 89 | 577 | 66048000 | 3100 | |
| 52817854 | LJC00118 | E | April 16, 2019, 10:29 a.m. | OK | GNU C++11 | TESTS | 89 | 577 | 76288000 | 3100 | |
| 31527439 | vjudge1 | E | Oct. 20, 2017, 8:49 a.m. | OK | GNU C++14 | TESTS | 89 | 810 | 108441600 | 3100 | |
| 31527403 | q234rty | E | Oct. 20, 2017, 8:48 a.m. | OK | GNU C++14 | TESTS | 89 | 810 | 108441600 | 3100 | |
| 20925383 | Steven_Wu | E | Sept. 26, 2016, 12:47 p.m. | OK | GNU C++14 | TESTS | 89 | 997 | 56422400 | 3100 | |
| 57635553 | dbdbab | E | July 24, 2019, 10:36 a.m. | OK | GNU C++14 | TESTS | 89 | 1044 | 88268800 | 3100 | |
| 62053277 | unk2001 | E | Oct. 7, 2019, 10:12 a.m. | OK | GNU C++14 | TESTS | 89 | 1060 | 89600000 | 3100 | |
| 59921764 | lzoiexplorer2004 | E | Sept. 2, 2019, 11:43 p.m. | OK | GNU C++14 | TESTS | 89 | 1060 | 102502400 | 3100 | |
| 57636495 | dbdbab | E | July 24, 2019, 11 a.m. | OK | GNU C++14 | TESTS | 89 | 1122 | 88268800 | 3100 | |
| 31520868 | vjudge4 | E | Oct. 20, 2017, 12:58 a.m. | OK | GNU C++14 | TESTS | 89 | 1153 | 49971200 | 3100 | |
| 31520911 | jzqjzq | E | Oct. 20, 2017, 1:03 a.m. | OK | GNU C++14 | TESTS | 89 | 1169 | 49971200 | 3100 | |
| 38548763 | wcz112 | E | May 23, 2018, 1:13 a.m. | OK | GNU C++14 | TESTS | 89 | 1169 | 69120000 | 3100 | |
| 56248683 | Smaug | E | June 29, 2019, 12:26 a.m. | OK | GNU C++17 | TESTS | 89 | 1060 | 79564800 | 3100 | |
| 57068104 | vjudge3 | E | July 15, 2019, 12:19 a.m. | OK | GNU C++17 | TESTS | 89 | 1106 | 60006400 | 3100 | |
| 41106082 | ainta | E | Aug. 2, 2018, 4:13 a.m. | OK | GNU C++17 | TESTS | 89 | 1247 | 79564800 | 3100 | |
| 57325227 | zrz_orz | E | July 19, 2019, 11:50 a.m. | OK | GNU C++17 | TESTS | 89 | 1450 | 78438400 | 3100 | |
| 35800975 | Als123 | E | March 1, 2018, 3:25 a.m. | OK | GNU C++17 | TESTS | 89 | 1481 | 110284800 | 3100 | |
| 63365324 | ko_osaga | E | Oct. 25, 2019, 7:15 a.m. | OK | GNU C++17 | TESTS | 89 | 1481 | 150835200 | 3100 | |
| 45709172 | AwD | E | Nov. 14, 2018, 1:12 p.m. | OK | GNU C++17 | TESTS | 89 | 1638 | 120012800 | 3100 | |
| 59572384 | Hoshi08 | E | Aug. 27, 2019, 1:01 p.m. | OK | GNU C++17 | TESTS | 89 | 1887 | 115302400 | 3100 | |
| 69756274 | AM. | E | Jan. 29, 2020, 3:21 p.m. | OK | GNU C++17 | TESTS | 89 | 2355 | 124006400 | 3100 | |
| 35162612 | 112 | E | Feb. 11, 2018, 7:53 p.m. | OK | GNU C++17 | TESTS | 89 | 2401 | 104448000 | 3100 | |
| 17198927 | cchli | E | April 7, 2016, 5 a.m. | OK | Java 8 | TESTS | 89 | 1466 | 120934400 | 3100 | |
| 16585880 | mmaxio | E | March 7, 2016, 3:01 p.m. | OK | Java 8 | TESTS | 89 | 2120 | 163840000 | 3100 | |
| 16624547 | mmaxio | E | March 9, 2016, 9:14 p.m. | OK | Java 8 | TESTS | 89 | 2667 | 232755200 | 3100 | |
| 16732263 | fmoraes | E | March 15, 2016, 6:01 p.m. | OK | Java 8 | TESTS | 89 | 5178 | 142540800 | 3100 | |
| 16716100 | fmoraes | E | March 14, 2016, 2:43 p.m. | OK | Java 8 | TESTS | 89 | 5209 | 142540800 | 3100 |
Back to search problems