Codeforces Round 906 (Div. 1)

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
1889 Codeforces Round 906 (Div. 1) FINISHED False 9000 38676263 Oct. 28, 2023, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1048 ) C2 Doremy's Drying Plan (Hard Version) PROGRAMMING data structures dp

B'The only differences between the two versions of this problem are the constraint on k , the time limit and the memory limit. You can make hacks only if all versions of the problem are solved. Doremy lives in a rainy country consisting of n cities numbered from 1 to n . The weather broadcast predicted the distribution of rain in the next m days. In the i -th day, it will rain in the cities in the interval [l_i, r_i] . A city is called dry if it will never rain in that city in the next m days. It turns out that Doremy has a special power. She can choose k days, and during these days it will not rain. Doremy wants to calculate the maximum number of dry cities after using the special power. The input consists of multiple test cases. The first line contains a single integer t ( 1 <= t <= 10^4 ) -- the number of test cases. The description of the test cases follows. The first line contains three integers n , m and k ( 1 <= n <= 2 cdot 10^5 , 2 <= m <= 2 cdot 10^5 , 2 <= k <= min(10, m) ) -- the number of cities, the number of days, and the number of days of rain that Doremy can prevent. Then, m lines follow. The i -th line contains two integers l_i , r_i ( 1 <= l_i <= r_i <= n ) -- the rain coverage on day i . It is guaranteed that the sum of n and the sum of m over all test cases do not exceed 2 cdot 10^5 . For each test case, output one integer -- the maximum number of dry cities. In the first test case, if Doremy prevents So there is at most 1 dry city. In the second test case, if Doremy prevents So there are at most 2 dry cities. In the third test case, it is optimal to prevent rain 1,2,4,5 . In the forth test case, there is always a day of rain that wets all the cities and cannot be prevented. '...

Tutorials

Codeforces Round 906 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
230255343 Leasier C2 Oct. 28, 2023, 4:45 p.m. OK GNU C++14 TESTS 50 280 39936000
230248578 crazy_sea C2 Oct. 28, 2023, 4:27 p.m. OK GNU C++14 TESTS 50 514 49868800
230231558 ttklwxx C2 Oct. 28, 2023, 3:48 p.m. OK GNU C++14 TESTS 50 577 32870400
230246142 cqbzdj C2 Oct. 28, 2023, 4:21 p.m. OK GNU C++14 TESTS 50 577 309350400
230232798 xukai C2 Oct. 28, 2023, 3:50 p.m. OK GNU C++14 TESTS 50 624 201113600
230308121 R_S_Z C2 Oct. 29, 2023, 4:13 a.m. OK GNU C++14 TESTS 51 779 80896000
230240295 yzz162534 C2 Oct. 28, 2023, 4:07 p.m. OK GNU C++14 TESTS 50 795 64614400
230255579 Mapakaka C2 Oct. 28, 2023, 4:46 p.m. OK GNU C++14 TESTS 50 1091 34611200
230305963 omeganot C2 Oct. 29, 2023, 3:38 a.m. OK GNU C++14 TESTS 51 1138 53452800
230254171 Noam527 C2 Oct. 28, 2023, 4:42 p.m. OK GNU C++14 TESTS 50 1326 47718400
230266700 patou C2 Oct. 28, 2023, 5:39 p.m. OK GNU C++17 TESTS 50 264 14336000
230256391 Nson C2 Oct. 28, 2023, 4:48 p.m. OK GNU C++17 TESTS 50 452 30617600
230246210 hos.lyric C2 Oct. 28, 2023, 4:21 p.m. OK GNU C++17 TESTS 50 530 54067200
230258391 pooty C2 Oct. 28, 2023, 4:53 p.m. OK GNU C++17 TESTS 50 607 24576000
230235582 peltorator C2 Oct. 28, 2023, 3:56 p.m. OK GNU C++17 TESTS 50 623 56012800
230315055 RobeZH C2 Oct. 29, 2023, 5:46 a.m. OK GNU C++17 TESTS 51 639 208486400
230314935 RobeZH C2 Oct. 29, 2023, 5:45 a.m. OK GNU C++17 TESTS 51 655 208793600
230252024 Faruzan C2 Oct. 28, 2023, 4:36 p.m. OK GNU C++17 TESTS 50 670 19763200
230278306 sg0071729 C2 Oct. 28, 2023, 7 p.m. OK GNU C++17 TESTS 50 748 59289600
230249278 tokusakurai C2 Oct. 28, 2023, 4:29 p.m. OK GNU C++17 TESTS 50 748 65843200
230272089 ITworker_Z C2 Oct. 28, 2023, 6:12 p.m. OK GNU C++17 (64) TESTS 50 187 145510400
230238386 LittleCube C2 Oct. 28, 2023, 4:02 p.m. OK GNU C++17 (64) TESTS 50 296 38502400
230236162 kotatsugame C2 Oct. 28, 2023, 3:57 p.m. OK GNU C++17 (64) TESTS 50 374 56320000
230316039 Superposition C2 Oct. 29, 2023, 5:57 a.m. OK GNU C++17 (64) TESTS 51 421 49049600
230236721 K-H C2 Oct. 28, 2023, 3:59 p.m. OK GNU C++17 (64) TESTS 50 436 53145600
230242070 TLEwpdus C2 Oct. 28, 2023, 4:11 p.m. OK GNU C++17 (64) TESTS 50 451 31436800
230293632 chappy1 C2 Oct. 28, 2023, 10:20 p.m. OK GNU C++17 (64) TESTS 51 451 44544000
230242663 _lbw_ C2 Oct. 28, 2023, 4:12 p.m. OK GNU C++17 (64) TESTS 50 451 54067200
230262546 SmolBrain C2 Oct. 28, 2023, 5:04 p.m. OK GNU C++17 (64) TESTS 50 482 66867200
230314437 square1001 C2 Oct. 29, 2023, 5:39 a.m. OK GNU C++17 (64) TESTS 51 529 9625600
230287352 maxplus C2 Oct. 28, 2023, 8:36 p.m. OK GNU C++20 (64) TESTS 50 93 3174400
230287545 maxplus C2 Oct. 28, 2023, 8:39 p.m. OK GNU C++20 (64) TESTS 50 124 3174400
230258373 5sb C2 Oct. 28, 2023, 4:53 p.m. OK GNU C++20 (64) TESTS 50 171 116940800
230243454 vgtcross C2 Oct. 28, 2023, 4:14 p.m. OK GNU C++20 (64) TESTS 50 249 15257600
230225217 METHOD_METAFALICA C2 Oct. 28, 2023, 3:35 p.m. OK GNU C++20 (64) TESTS 50 249 19763200
230245609 Endagorion C2 Oct. 28, 2023, 4:20 p.m. OK GNU C++20 (64) TESTS 50 249 59187200
230265811 filibuster C2 Oct. 28, 2023, 5:35 p.m. OK GNU C++20 (64) TESTS 50 280 24883200
230284737 _no__way C2 Oct. 28, 2023, 8:05 p.m. OK GNU C++20 (64) TESTS 50 295 51404800
230307630 Lynkcat C2 Oct. 29, 2023, 4:05 a.m. OK GNU C++20 (64) TESTS 51 296 47206400
230256211 BellaKira C2 Oct. 28, 2023, 4:48 p.m. OK GNU C++20 (64) TESTS 50 296 47206400
230287840 Tlatoani C2 Oct. 28, 2023, 8:43 p.m. OK Kotlin 1.6 TESTS 51 811 5939200
230287701 Tlatoani C2 Oct. 28, 2023, 8:41 p.m. OK Kotlin 1.6 TESTS 51 904 9420800
230288148 Tlatoani C2 Oct. 28, 2023, 8:47 p.m. OK Kotlin 1.6 TESTS 51 904 20172800
230288079 Tlatoani C2 Oct. 28, 2023, 8:46 p.m. OK Kotlin 1.6 TESTS 51 982 34918400
230228370 Tlatoani C2 Oct. 28, 2023, 3:41 p.m. OK Kotlin 1.6 TESTS 50 1013 9420800
230262810 FastFreeTask C2 Oct. 28, 2023, 5:04 p.m. OK Kotlin 1.6 TESTS 50 1310 110489600
230288070 Tlatoani C2 Oct. 28, 2023, 8:46 p.m. OK Kotlin 1.7 TESTS 51 1466 380108800
230288157 Tlatoani C2 Oct. 28, 2023, 8:47 p.m. OK Kotlin 1.7 TESTS 51 1466 429465600
230287844 Tlatoani C2 Oct. 28, 2023, 8:43 p.m. OK Kotlin 1.7 TESTS 51 1684 490291200
230287646 Tlatoani C2 Oct. 28, 2023, 8:40 p.m. OK Kotlin 1.7 TESTS 51 1902 598528000
230246006 sansen C2 Oct. 28, 2023, 4:21 p.m. OK Rust 2021 TESTS 50 1669 67993600

remove filters

Back to search problems