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 |
---|---|---|---|---|---|---|
1380 | Educational Codeforces Round 91 (Rated for Div. 2) | FINISHED | False | 9000 | 142614862 | July 12, 2020, 2:45 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 2212 ) | E | Merging Towers | PROGRAMMING | data structures ds implementation trees |
B'You have a set of n discs, the i -th disc has radius i . Initially, these discs are split among m towers: each tower contains at least one disc, and the discs in each tower are sorted in descending order of their radii from bottom to top. You would like to assemble one tower containing all of those discs. To do so, you may choose two different towers i and j (each containing at least one disc), take several (possibly all) top discs from the tower i and put them on top of the tower j in the same order, as long as the top disc of tower j is bigger than each of the discs you move. You may perform this operation any number of times. For example, if you have two towers containing discs [6, 4, 2, 1] and [8, 7, 5, 3] (in order from bottom to top), there are only two possible operations: Let the difficulty of some set of towers be the minimum number of operations required to assemble one tower containing all of the discs. For example, the difficulty of the set of towers [[3, 1], [2]] is 2 : you may move the disc 1 to the second tower, and then move both discs from the second tower to the first tower. You are given m - 1 queries. Each query is denoted by two numbers a_i and b_i , and means "merge the towers a_i and b_i " (that is, take all discs from these two towers and assemble a new tower containing all of them in descending order of their radii from top to bottom). The resulting tower gets index a_i . For each k in [0, m - 1] , calculate the difficulty of the set of towers after the first k queries are performed. The first line of the input contains two integers n and m ( 2 <= m <= n <= 2 cdot 10^5 ) -- the number of discs and the number of towers, respectively. The second line contains n integers t_1 , t_2 , ..., t_n ( 1 <= t_i <= m ), where t_i is the index of the tower disc i$$'... |
Educational Codeforces Round 91 Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
86694845 | Gassa | E | July 12, 2020, 5:19 p.m. | OK | D | TESTS | 54 | 358 | 60006400 | ||
86710496 | Frame233 | E | July 13, 2020, 12:48 a.m. | OK | GNU C++11 | TESTS | 54 | 124 | 26112000 | ||
86700831 | ujzwt4it | E | July 12, 2020, 6:52 p.m. | OK | GNU C++11 | TESTS | 54 | 249 | 26931200 | ||
86692420 | anson370 | E | July 12, 2020, 5 p.m. | OK | GNU C++11 | TESTS | 54 | 249 | 27750400 | ||
86710613 | scimoon | E | July 13, 2020, 12:54 a.m. | OK | GNU C++11 | TESTS | 54 | 296 | 54579200 | ||
86714277 | fujian | E | July 13, 2020, 3:15 a.m. | OK | GNU C++11 | TESTS | 54 | 373 | 89600000 | ||
86699223 | _PTT_NTHO_ | E | July 12, 2020, 6:22 p.m. | OK | GNU C++11 | TESTS | 54 | 452 | 37888000 | ||
86696435 | wang_sj | E | July 12, 2020, 5:39 p.m. | OK | GNU C++11 | TESTS | 54 | 483 | 26214400 | ||
86712326 | ORZZZQTXDY | E | July 13, 2020, 2:06 a.m. | OK | GNU C++11 | TESTS | 54 | 514 | 84889600 | ||
86711802 | ActorBlack | E | July 13, 2020, 1:44 a.m. | OK | GNU C++11 | TESTS | 54 | 530 | 73113600 | ||
86712005 | YJJ_Konnyaku | E | July 13, 2020, 1:53 a.m. | OK | GNU C++11 | TESTS | 54 | 545 | 72294400 | ||
86691609 | Juanito98 | E | July 12, 2020, 4:54 p.m. | OK | GNU C++14 | TESTS | 54 | 264 | 28262400 | ||
86691117 | HeathcliffAC | E | July 12, 2020, 4:51 p.m. | OK | GNU C++14 | TESTS | 54 | 265 | 54272000 | ||
86691011 | Zoli9 | E | July 12, 2020, 4:50 p.m. | OK | GNU C++14 | TESTS | 54 | 280 | 25907200 | ||
86696426 | TheLethalCode | E | July 12, 2020, 5:39 p.m. | OK | GNU C++14 | TESTS | 54 | 280 | 26931200 | ||
86695992 | TheLethalCode | E | July 12, 2020, 5:32 p.m. | OK | GNU C++14 | TESTS | 54 | 311 | 26931200 | ||
86693780 | rps13 | E | July 12, 2020, 5:10 p.m. | OK | GNU C++14 | TESTS | 54 | 311 | 28262400 | ||
86689787 | ruto | E | July 12, 2020, 4:41 p.m. | OK | GNU C++14 | TESTS | 54 | 327 | 26931200 | ||
86681836 | dlalswp25 | E | July 12, 2020, 3:59 p.m. | OK | GNU C++14 | TESTS | 54 | 358 | 55603200 | ||
86706425 | ansh_bafna | E | July 12, 2020, 9:23 p.m. | OK | GNU C++14 | TESTS | 54 | 373 | 43827200 | ||
86683855 | lucaperju | E | July 12, 2020, 4:08 p.m. | OK | GNU C++14 | TESTS | 54 | 452 | 32358400 | ||
86673302 | LayCurse | E | July 12, 2020, 3:31 p.m. | OK | GNU C++17 | TESTS | 54 | 187 | 124416000 | ||
86675407 | natsugiri | E | July 12, 2020, 3:37 p.m. | OK | GNU C++17 | TESTS | 54 | 218 | 16281600 | ||
86697922 | Lemur95 | E | July 12, 2020, 6 p.m. | OK | GNU C++17 | TESTS | 54 | 218 | 26214400 | ||
86682867 | antonis.white | E | July 12, 2020, 4:04 p.m. | OK | GNU C++17 | TESTS | 54 | 249 | 25907200 | ||
86706141 | _overrated_ | E | July 12, 2020, 9:12 p.m. | OK | GNU C++17 | TESTS | 54 | 264 | 25907200 | ||
86683830 | RobeZH | E | July 12, 2020, 4:08 p.m. | OK | GNU C++17 | TESTS | 54 | 264 | 26214400 | ||
86691210 | VEGAnn | E | July 12, 2020, 4:51 p.m. | OK | GNU C++17 | TESTS | 54 | 265 | 26214400 | ||
86694713 | Feechka_ | E | July 12, 2020, 5:17 p.m. | OK | GNU C++17 | TESTS | 54 | 280 | 26112000 | ||
86684750 | cookiedoth | E | July 12, 2020, 4:13 p.m. | OK | GNU C++17 | TESTS | 54 | 280 | 26214400 | ||
86701365 | Ronnie007 | E | July 12, 2020, 7:03 p.m. | OK | GNU C++17 | TESTS | 54 | 280 | 26521600 | ||
86709237 | emorgan5289 | E | July 12, 2020, 11:28 p.m. | OK | GNU C++17 (64) | TESTS | 54 | 202 | 40038400 | ||
86673074 | dorijanlendvaj | E | July 12, 2020, 3:30 p.m. | OK | GNU C++17 (64) | TESTS | 54 | 217 | 34201600 | ||
86675522 | Geothermal | E | July 12, 2020, 3:37 p.m. | OK | GNU C++17 (64) | TESTS | 54 | 218 | 29798400 | ||
86691427 | besieger | E | July 12, 2020, 4:53 p.m. | OK | GNU C++17 (64) | TESTS | 54 | 249 | 31948800 | ||
86689997 | ALILILILILI-KHAN | E | July 12, 2020, 4:43 p.m. | OK | GNU C++17 (64) | TESTS | 54 | 264 | 32972800 | ||
86685859 | victoragnez | E | July 12, 2020, 4:19 p.m. | OK | GNU C++17 (64) | TESTS | 54 | 280 | 29593600 | ||
86703398 | vrishinvv | E | July 12, 2020, 7:51 p.m. | OK | GNU C++17 (64) | TESTS | 54 | 342 | 79872000 | ||
86701914 | tute7627 | E | July 12, 2020, 7:16 p.m. | OK | GNU C++17 (64) | TESTS | 54 | 390 | 24268800 | ||
86695633 | lightseba | E | July 12, 2020, 5:27 p.m. | OK | GNU C++17 (64) | TESTS | 54 | 561 | 105472000 | ||
86713016 | WZYYN | E | July 13, 2020, 2:31 a.m. | OK | GNU C++17 (64) | TESTS | 54 | 592 | 41164800 | ||
86716379 | Oopsimbad | E | July 13, 2020, 4:17 a.m. | OK | Java 11 | TESTS | 54 | 483 | 28467200 | ||
86685816 | uwi | E | July 12, 2020, 4:18 p.m. | OK | Java 11 | TESTS | 54 | 607 | 60825600 | ||
86693860 | KharYusuf | E | July 12, 2020, 5:10 p.m. | OK | Java 8 | TESTS | 54 | 639 | 98508800 | ||
86704595 | AnandOza | E | July 12, 2020, 8:24 p.m. | OK | Java 8 | TESTS | 54 | 810 | 224563200 | ||
86703846 | AnandOza | E | July 12, 2020, 8:03 p.m. | OK | Java 8 | TESTS | 54 | 920 | 249753600 | ||
86704079 | ijxjdjd | E | July 12, 2020, 8:10 p.m. | OK | Java 8 | TESTS | 54 | 1434 | 119500800 | ||
86705562 | MagentaCobra | E | July 12, 2020, 8:53 p.m. | OK | Java 8 | TESTS | 54 | 1544 | 178688000 | ||
86684563 | TheSawan | E | July 12, 2020, 4:12 p.m. | OK | Java 8 | TESTS | 54 | 1606 | 146124800 | ||
86681902 | SecondThread | E | July 12, 2020, 4 p.m. | OK | Java 8 | TESTS | 54 | 1762 | 200499200 | ||
86707858 | robinz62 | E | July 12, 2020, 10:16 p.m. | OK | Java 8 | TESTS | 54 | 1855 | 160153600 | ||
86705346 | sylvyrfysh | E | July 12, 2020, 8:46 p.m. | OK | Kotlin | TESTS | 54 | 592 | 63078400 | ||
86683968 | Tlatoani | E | July 12, 2020, 4:09 p.m. | OK | Kotlin | TESTS | 54 | 763 | 82022400 | ||
86683553 | pajenegod | E | July 12, 2020, 4:07 p.m. | OK | PyPy 2 | TESTS | 54 | 826 | 117452800 | ||
86699636 | nahid08 | E | July 12, 2020, 6:29 p.m. | OK | PyPy 3 | TESTS | 54 | 1326 | 118681600 | ||
86699597 | infxx | E | July 12, 2020, 6:28 p.m. | OK | PyPy 3 | TESTS | 54 | 1326 | 118681600 | ||
86699189 | nehan_der_thal | E | July 12, 2020, 6:21 p.m. | OK | PyPy 3 | TESTS | 54 | 1606 | 97177600 | ||
86706573 | robostac | E | July 12, 2020, 9:28 p.m. | OK | Rust | TESTS | 54 | 561 | 36761600 | ||
86706524 | robostac | E | July 12, 2020, 9:27 p.m. | OK | Rust | TESTS | 54 | 576 | 36761600 | ||
86706610 | robostac | E | July 12, 2020, 9:29 p.m. | OK | Rust | TESTS | 54 | 592 | 36761600 | ||
86706617 | robostac | E | July 12, 2020, 9:30 p.m. | OK | Rust | TESTS | 54 | 607 | 36761600 |
Back to search problems