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 |
---|---|---|---|---|---|---|
1548 | Codeforces Round 736 (Div. 1) | FINISHED | False | 8700 | 109351463 | Aug. 1, 2021, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 483 ) | E | Gregor and the Two Painters | PROGRAMMING | data structures graphs math |
B"Two painters, Amin and Benj, are repainting Gregor's living room ceiling! The ceiling can be modeled as an n x m grid. For each i between 1 and n , inclusive, painter Amin applies a_i layers of paint to the entire i -th row. For each j between 1 and m , inclusive, painter Benj applies b_j layers of paint to the entire j -th column. Therefore, the cell (i,j) ends up with a_i+b_j layers of paint. Gregor considers the cell (i,j) to be badly painted if a_i+b_j <= x . Define a badly painted region to be a maximal connected component of badly painted cells, i. e. a connected component of badly painted cells such that all adjacent to the component cells are not badly painted. Two cells are considered adjacent if they share a side. Gregor is appalled by the state of the finished ceiling, and wants to know the number of badly painted regions. The first line contains three integers n , m and x ( 1 <= n,m <= 2 cdot 10^5 , 1 <= x <= 2 cdot 10^5 ) -- the dimensions of Gregor's ceiling, and the maximum number of paint layers in a badly painted cell. The second line contains n integers a_1, a_2, ldots, a_n ( 1 <= a_i <= 2 cdot 10^5 ), the number of paint layers Amin applies to each row. The third line contains m integers b_1, b_2, ldots, b_m ( 1 <= b_j <= 2 cdot 10^5 ), the number of paint layers Benj applies to each column. Print a single integer, the number of badly painted regions. The diagram below represents the first example. The numbers to the left of each row represent the list a , and the numbers above each column represent the list b . The numbers inside each cell represent the number of paint layers in that cell. The colored cells correspond to badly painted cells. The red and blue cells respectively form 2 badly painted regions. "... |
Codeforces Round 736 Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
124598455 | rainboy | E | Aug. 1, 2021, 4:47 p.m. | OK | GNU C11 | TESTS | 82 | 280 | 26112000 | ||
124594126 | Isonan | E | Aug. 1, 2021, 4:36 p.m. | OK | GNU C++11 | TESTS | 82 | 311 | 58982400 | ||
124643351 | yzc2005 | E | Aug. 2, 2021, 4:50 a.m. | OK | GNU C++11 | TESTS | 82 | 342 | 48947200 | ||
124604035 | ccf_n0i | E | Aug. 1, 2021, 4:59 p.m. | OK | GNU C++14 | TESTS | 82 | 545 | 47411200 | ||
124592242 | Radewoosh | E | Aug. 1, 2021, 4:31 p.m. | OK | GNU C++14 | TESTS | 82 | 1653 | 199577600 | ||
124590654 | yhx-12243 | E | Aug. 1, 2021, 4:27 p.m. | OK | GNU C++17 | TESTS | 82 | 218 | 39936000 | ||
124597470 | Barichek | E | Aug. 1, 2021, 4:44 p.m. | OK | GNU C++17 | TESTS | 82 | 264 | 75468800 | ||
124581595 | Miracle03 | E | Aug. 1, 2021, 4:05 p.m. | OK | GNU C++17 | TESTS | 82 | 451 | 64409600 | ||
124639173 | jiangly | E | Aug. 2, 2021, 3:56 a.m. | OK | GNU C++17 (64) | TESTS | 82 | 124 | 12083200 | ||
124591964 | Petr | E | Aug. 1, 2021, 4:30 p.m. | OK | GNU C++17 (64) | TESTS | 82 | 187 | 16486400 | ||
124619322 | Maksim1744 | E | Aug. 1, 2021, 9:05 p.m. | OK | GNU C++17 (64) | TESTS | 82 | 249 | 18944000 | ||
124635287 | wygzgyw | E | Aug. 2, 2021, 3:01 a.m. | OK | GNU C++17 (64) | TESTS | 82 | 249 | 29184000 | ||
124615363 | lumibons | E | Aug. 1, 2021, 8:07 p.m. | OK | GNU C++17 (64) | TESTS | 82 | 265 | 33996800 | ||
124597899 | tourist | E | Aug. 1, 2021, 4:45 p.m. | OK | GNU C++17 (64) | TESTS | 82 | 358 | 42291200 | ||
124639322 | dragonslayerintraining | E | Aug. 2, 2021, 3:58 a.m. | OK | GNU C++17 (64) | TESTS | 82 | 389 | 36249600 | ||
124638947 | dragonslayerintraining | E | Aug. 2, 2021, 3:52 a.m. | OK | GNU C++17 (64) | TESTS | 82 | 389 | 36249600 | ||
124577426 | mango_lassi | E | Aug. 1, 2021, 3:55 p.m. | OK | GNU C++17 (64) | TESTS | 82 | 498 | 48332800 | ||
124617555 | emorgan5289 | E | Aug. 1, 2021, 8:35 p.m. | OK | GNU C++17 (64) | TESTS | 82 | 764 | 101478400 |
Back to search problems