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 |
---|---|---|---|---|---|---|
1534 | Codeforces LATOKEN Round 1 (Div. 1 + Div. 2) | FINISHED | False | 10800 | 108224699 | June 13, 2021, 3:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 565 ) | F2 | Falling Sand (Hard Version) | PROGRAMMING | dfs and similar dp graphs greedy |
B'This is the hard version of the problem. The difference between the versions is the constraints on a_i . You can make hacks only if all versions of the problem are solved. Little Dormi has recently received a puzzle from his friend and needs your help to solve it. The puzzle consists of an upright board with n rows and m columns of cells, some empty and some filled with blocks of sand, and m non-negative integers a_1,a_2, ldots,a_m ( 0 <= q a_i <= q n ). In this version of the problem, a_i will always be not greater than the number of blocks of sand in column i . When a cell filled with a block of sand is disturbed, the block of sand will fall from its cell to the sand counter at the bottom of the column (each column has a sand counter). While a block of sand is falling, other blocks of sand that are adjacent at any point to the falling block of sand will also be disturbed and start to fall. Specifically, a block of sand disturbed at a cell (i,j) will pass through all cells below and including the cell (i,j) within the column, disturbing all adjacent cells along the way. Here, the cells adjacent to a cell (i,j) are defined as (i-1,j) , (i,j-1) , (i+1,j) , and (i,j+1) (if they are within the grid). Note that the newly falling blocks can disturb other blocks. In one operation you are able to disturb any piece of sand. The puzzle is solved when there are at least a_i blocks of sand counted in the i -th sand counter for each column from 1 to m . You are now tasked with finding the minimum amount of operations in order to solve the puzzle. Note that Little Dormi will never give you a puzzle that is impossible to solve. The first line consists of two space-separated positive integers n and m ( 1 <= q n cdot m <= q 400 ,000 ). Each of the next n lines contains m characters, describing each row of the board. If a character on a lin'... |
Codeforces LATOKEN Round 1 (Div. 1 + Div. 2) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
119408841 | Suiseiseki | F2 | June 14, 2021, 1:12 a.m. | OK | GNU C++11 | TESTS | 216 | 124 | 58368000 | ||
119388765 | LJC00118 | F2 | June 13, 2021, 6:03 p.m. | OK | GNU C++11 | TESTS | 216 | 327 | 135372800 | ||
119400446 | Radewoosh | F2 | June 13, 2021, 7:57 p.m. | OK | GNU C++14 | TESTS | 216 | 233 | 87142400 | ||
119397406 | djq_fpc | F2 | June 13, 2021, 6:34 p.m. | OK | GNU C++14 | TESTS | 216 | 296 | 66764800 | ||
119406064 | zeliboba | F2 | June 13, 2021, 10:27 p.m. | OK | GNU C++14 | TESTS | 216 | 420 | 90828800 | ||
119409760 | OrlKorrekt | F2 | June 14, 2021, 1:46 a.m. | OK | GNU C++17 | TESTS | 216 | 140 | 35737600 | ||
119405301 | Resende | F2 | June 13, 2021, 9:54 p.m. | OK | GNU C++17 | TESTS | 216 | 140 | 35737600 | ||
119399592 | sd0061 | F2 | June 13, 2021, 7:50 p.m. | OK | GNU C++17 | TESTS | 216 | 233 | 53145600 | ||
119395688 | fsouza | F2 | June 13, 2021, 6:30 p.m. | OK | GNU C++17 | TESTS | 216 | 249 | 63590400 | ||
119404978 | sam.rei | F2 | June 13, 2021, 9:42 p.m. | OK | GNU C++17 | TESTS | 216 | 280 | 71270400 | ||
119392161 | Martin53 | F2 | June 13, 2021, 6:17 p.m. | OK | GNU C++17 | TESTS | 216 | 327 | 76800000 | ||
119403774 | sanskar | F2 | June 13, 2021, 9:03 p.m. | OK | GNU C++17 | TESTS | 216 | 358 | 72294400 | ||
119390310 | Golovanov399 | F2 | June 13, 2021, 6:10 p.m. | OK | GNU C++17 | TESTS | 216 | 390 | 126464000 | ||
119403227 | maximumSHOT | F2 | June 13, 2021, 8:50 p.m. | OK | GNU C++17 | TESTS | 216 | 436 | 84377600 | ||
119400422 | Ra16bit | F2 | June 13, 2021, 7:56 p.m. | OK | GNU C++17 | TESTS | 216 | 436 | 91033600 | ||
119409276 | yhx-12243 | F2 | June 14, 2021, 1:30 a.m. | OK | GNU C++17 (64) | TESTS | 216 | 92 | 68300800 | ||
119390538 | mango_lassi | F2 | June 13, 2021, 6:11 p.m. | OK | GNU C++17 (64) | TESTS | 216 | 93 | 16076800 | ||
119390251 | hitonanode | F2 | June 13, 2021, 6:10 p.m. | OK | GNU C++17 (64) | TESTS | 216 | 171 | 59699200 | ||
119399836 | jiangly | F2 | June 13, 2021, 7:52 p.m. | OK | GNU C++17 (64) | TESTS | 216 | 202 | 74342400 | ||
119400908 | Dormi | F2 | June 13, 2021, 8:01 p.m. | OK | GNU C++17 (64) | TESTS | 216 | 202 | 128102400 | ||
119404750 | ecnerwala | F2 | June 13, 2021, 9:33 p.m. | OK | GNU C++17 (64) | TESTS | 216 | 218 | 105984000 | ||
119406434 | MarcosK | F2 | June 13, 2021, 10:51 p.m. | OK | GNU C++17 (64) | TESTS | 216 | 218 | 123084800 | ||
119389728 | kostia244 | F2 | June 13, 2021, 6:07 p.m. | OK | GNU C++17 (64) | TESTS | 216 | 264 | 170700800 | ||
119387718 | Xellos | F2 | June 13, 2021, 5:59 p.m. | OK | GNU C++17 (64) | TESTS | 216 | 280 | 89907200 | ||
119421776 | davidberard | F2 | June 14, 2021, 5:50 a.m. | OK | GNU C++17 (64) | TESTS | 217 | 280 | 116224000 | ||
119393953 | SecondThread | F2 | June 13, 2021, 6:24 p.m. | OK | Java 8 | TESTS | 216 | 1465 | 356454400 | ||
119411112 | belkka | F2 | June 14, 2021, 2:27 a.m. | OK | Python 3 | TESTS | 216 | 842 | 33382400 | ||
119402281 | sansen | F2 | June 13, 2021, 8:23 p.m. | OK | Rust | TESTS | 216 | 155 | 60108800 |
Back to search problems