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 |
---|---|---|---|---|---|---|
1137 | Codeforces Round 545 (Div. 1) | FINISHED | False | 9000 | 179787299 | March 8, 2019, 9:05 a.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 470 ) | F | Matches Are Not a Child's Play | PROGRAMMING | data structures trees | 3300 |
B'Lena is playing with matches. The natural question arising in the head of any child playing with matches is whether it 's possible to set a tree on fire with a matches, or not. Let 's say, that the tree is a connected graph without cycles and the vertices are labeled with integers 1, 2, ldots, n . Also every vertex v has some integer priority p_v associated with it. All priorities are distinct. It turns out, that if you set a tree on fire, it will burn to nothing. However, this process doesn 't happen instantly. At the beginning, burns out the leaf (a vertex is called to be a leaf if it has only one adjacent vertex) of the tree of the minimum priority. Then burns out the leaf of the minimal priority of the remaining tree, and so on. This way, the vertices turn into the leaves and burn out until only one vertex remains. Then this vertex burns out as well. Lena has prepared a tree of n vertices and every vertex in it has a priority p_v = v . Lena is very curious about burning out this tree. However, she understands, that if she will burn the tree now, then it will disappear completely. Lena is a kind girl and she will feel bad for the burned tree, so she wants to study the process of burning the tree only in her mind. Lena wants to process q queries, each of them is one of three following types: Notice, that if all priorities would be distinct, then after the "up" query they will stay distinct as well. Initially all priorities are distinct, hence during any (purely hypothetical of course) burning of the tree, all leafs would have distinct priorities. The first line contains two integers n and q ( 2 <= n <= 200 ,000 , 1 <= q <= 200 ,000 ) -- the number of vertices in the tree and the number of queries. The i -th of the following n - 1 lines contains two integers v_i , u_i ( 1 <= v_i, u_i <= n ), denoting the endpoints of the i -th edge. Each of the remaining q li'... |
Codeforces Round #545 – Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
54155609 | __23333 | F | May 15, 2019, 3:53 a.m. | OK | GNU C++11 | TESTS | 71 | 311 | 18227200 | 3300 | |
53270336 | ql_wpc | F | April 25, 2019, 5:46 a.m. | OK | GNU C++11 | TESTS | 71 | 311 | 29081600 | 3300 | |
51967172 | Lagoon_ | F | March 29, 2019, 10:36 a.m. | OK | GNU C++11 | TESTS | 71 | 312 | 22425600 | 3300 | |
53033470 | stal_xy23z7b8 | F | April 20, 2019, 4:26 a.m. | OK | GNU C++11 | TESTS | 71 | 312 | 25702400 | 3300 | |
66317290 | Rikuki | F | Dec. 5, 2019, 1:24 p.m. | OK | GNU C++11 | TESTS | 71 | 327 | 16793600 | 3300 | |
54168329 | luogu_bot5 | F | May 15, 2019, 9:43 a.m. | OK | GNU C++11 | TESTS | 71 | 327 | 21094400 | 3300 | |
54167742 | 207M | F | May 15, 2019, 9:28 a.m. | OK | GNU C++11 | TESTS | 71 | 327 | 21094400 | 3300 | |
51860764 | geniuschen | F | March 26, 2019, 1:04 p.m. | OK | GNU C++11 | TESTS | 71 | 327 | 34508800 | 3300 | |
60059263 | lzoilxy | F | Sept. 5, 2019, 6:06 a.m. | OK | GNU C++11 | TESTS | 71 | 327 | 64819200 | 3300 | |
54277554 | comld | F | May 17, 2019, 11:52 a.m. | OK | GNU C++11 | TESTS | 71 | 342 | 16793600 | 3300 | |
51062431 | mayaohua2003 | F | March 9, 2019, 3:58 a.m. | OK | GNU C++14 | TESTS | 71 | 421 | 16998400 | 3300 | |
51062375 | mayaohua2003 | F | March 9, 2019, 3:55 a.m. | OK | GNU C++14 | TESTS | 71 | 436 | 16998400 | 3300 | |
51108453 | yhx-12243 | F | March 10, 2019, 2:03 a.m. | OK | GNU C++14 | TESTS | 71 | 452 | 27238400 | 3300 | |
57481066 | beginend | F | July 22, 2019, 2:21 a.m. | OK | GNU C++14 | TESTS | 71 | 467 | 18432000 | 3300 | |
51613517 | An_Account | F | March 21, 2019, 11:32 a.m. | OK | GNU C++14 | TESTS | 71 | 483 | 17715200 | 3300 | |
51110462 | qiqi20021026 | F | March 10, 2019, 3:56 a.m. | OK | GNU C++14 | TESTS | 71 | 483 | 38502400 | 3300 | |
60196658 | Scut82 | F | Sept. 7, 2019, 2:17 a.m. | OK | GNU C++14 | TESTS | 71 | 499 | 26009600 | 3300 | |
51251450 | zstu_MingSD | F | March 13, 2019, 8:56 a.m. | OK | GNU C++14 | TESTS | 71 | 499 | 42291200 | 3300 | |
51021456 | apiadu | F | March 8, 2019, 11 a.m. | OK | GNU C++14 | TESTS | 71 | 514 | 27443200 | 3300 | |
52153616 | sheaf | F | April 1, 2019, 12:36 p.m. | OK | GNU C++14 | TESTS | 71 | 529 | 28569600 | 3300 | |
58894582 | nickluo | F | Aug. 16, 2019, 7:02 a.m. | OK | GNU C++17 | TESTS | 71 | 358 | 25702400 | 3300 | |
52141539 | CMXRYNP | F | April 1, 2019, 7:03 a.m. | OK | GNU C++17 | TESTS | 71 | 498 | 30617600 | 3300 | |
61830561 | Oak_Iimy | F | Oct. 4, 2019, 6:25 a.m. | OK | GNU C++17 | TESTS | 71 | 545 | 27443200 | 3300 | |
52460205 | sheaf | F | April 7, 2019, 1:08 p.m. | OK | GNU C++17 | TESTS | 71 | 560 | 28569600 | 3300 | |
59877009 | HorizonWind | F | Sept. 2, 2019, 12:51 a.m. | OK | GNU C++17 | TESTS | 71 | 561 | 57344000 | 3300 | |
51442498 | Eimaen | F | March 18, 2019, 10:50 a.m. | OK | GNU C++17 | TESTS | 71 | 577 | 15257600 | 3300 | |
51918642 | H2SH2SO4O4O4 | F | March 28, 2019, 1:35 a.m. | OK | GNU C++17 | TESTS | 71 | 577 | 32051200 | 3300 | |
51251543 | ShichengXiao | F | March 13, 2019, 8:59 a.m. | OK | GNU C++17 | TESTS | 71 | 592 | 16076800 | 3300 | |
51152102 | kczno1 | F | March 11, 2019, 8:31 a.m. | OK | GNU C++17 | TESTS | 71 | 624 | 22016000 | 3300 | |
56748142 | Fulisike | F | July 9, 2019, 10:45 a.m. | OK | GNU C++17 | TESTS | 71 | 639 | 17612800 | 3300 | |
52037920 | mmaxio | F | March 30, 2019, 5:38 p.m. | OK | Java 8 | TESTS | 71 | 530 | 22016000 | 3300 | |
51097611 | mmaxio | F | March 9, 2019, 5:16 p.m. | OK | Java 8 | TESTS | 71 | 1231 | 28569600 | 3300 | |
51583096 | hld67890 | F | March 20, 2019, 3:12 p.m. | OK | MS C++ 2017 | TESTS | 71 | 655 | 44236800 | 3300 |
Back to search problems