Codeforces Round 737 (Div. 2)

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
1557 Codeforces Round 737 (Div. 2) FINISHED False 7200 108833111 Aug. 9, 2021, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 2596 ) D Ezzat and Grid PROGRAMMING data structures dp graphs greedy

B'Moamen was drawing a grid of n rows and 10^9 columns containing only digits 0 and 1 . Ezzat noticed what Moamen was drawing and became interested in the minimum number of rows one needs to remove to make the grid beautiful. A grid is beautiful if and only if for every two consecutive rows there is at least one column containing 1 in these two rows. Ezzat will give you the number of rows n , and m segments of the grid that contain digits 1 . Every segment is represented with three integers i , l , and r , where i represents the row number, and l and r represent the first and the last column of the segment in that row. For example, if n = 3 , m = 6 , and the segments are (1,1,1) , (1,7,8) , (2,7,7) , (2,15,15) , (3,1,1) , (3,15,15) , then the grid is: Your task is to tell Ezzat the minimum number of rows that should be removed to make the grid beautiful. The first line contains two integers n and m ( 1 <= n, m <= 3 cdot10^5 ). Each of the next m lines contains three integers i , l , and r ( 1 <= i <= n , 1 <= l <= r <= 10^9 ). Each of these m lines means that row number i contains digits 1 in columns from l to r , inclusive. Note that the segments may overlap. In the first line, print a single integer k -- the minimum number of rows that should be removed. In the second line print k distinct integers r_1, r_2, ldots, r_k , representing the rows that should be removed ( 1 <= r_i <= n ), in any order. If there are multiple answers, print any. In the first test case, the grid is the one explained in the problem statement. The grid has the following properties: In the second test case, the given grid is as follows: '...

Tutorials

Codeforces Round #737 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
125437950 gxlois D Aug. 10, 2021, 3:42 a.m. OK D TESTS 72 2059 140083200
125429854 gxlois D Aug. 10, 2021, 1:18 a.m. OK D TESTS 72 2121 140083200
125429173 gxlois D Aug. 10, 2021, 1:02 a.m. OK D TESTS 72 2121 140083200
125436617 gxlois D Aug. 10, 2021, 3:20 a.m. OK D TESTS 72 2152 138854400
125427167 gxlois D Aug. 10, 2021, 12:05 a.m. OK D TESTS 72 2323 130662400
125428191 gxlois D Aug. 10, 2021, 12:36 a.m. OK D TESTS 72 2324 130662400
125426219 gxlois D Aug. 9, 2021, 11:29 p.m. OK D TESTS 72 2354 130662400
125426145 gxlois D Aug. 9, 2021, 11:26 p.m. OK D TESTS 72 2355 130662400
125428678 gxlois D Aug. 10, 2021, 12:50 a.m. OK D TESTS 72 2402 130662400
125426267 gxlois D Aug. 9, 2021, 11:31 p.m. OK D TESTS 72 2417 130662400
125409687 rainboy D Aug. 9, 2021, 5:59 p.m. OK GNU C11 TESTS 72 1013 24985600
125433823 xqbf D Aug. 10, 2021, 2:35 a.m. OK GNU C++11 TESTS 72 514 37376000
125436656 william555 D Aug. 10, 2021, 3:21 a.m. OK GNU C++11 TESTS 72 607 56934400
125405273 ACOIer D Aug. 9, 2021, 5:28 p.m. OK GNU C++11 TESTS 71 639 31846400
125400612 shejunda D Aug. 9, 2021, 4:31 p.m. OK GNU C++11 TESTS 71 639 58880000
125402000 Irressey D Aug. 9, 2021, 4:34 p.m. OK GNU C++11 TESTS 71 654 55500800
125428872 water_tomato D Aug. 10, 2021, 12:54 a.m. OK GNU C++11 TESTS 72 655 54681600
125445418 PigeonG D Aug. 10, 2021, 5:39 a.m. OK GNU C++11 TESTS 72 655 58982400
125428826 Sapphire162 D Aug. 10, 2021, 12:53 a.m. OK GNU C++11 TESTS 72 685 56832000
125428159 yingluosanqian D Aug. 10, 2021, 12:35 a.m. OK GNU C++11 TESTS 72 701 52121600
125446792 yyyz04 D Aug. 10, 2021, 5:59 a.m. OK GNU C++11 TESTS 72 701 69836800
125427108 srgioreinier D Aug. 10, 2021, 12:03 a.m. OK GNU C++14 TESTS 72 623 48537600
125427038 srgioreinier D Aug. 10, 2021, midnight OK GNU C++14 TESTS 72 639 48537600
125414789 0wuming0 D Aug. 9, 2021, 6:56 p.m. OK GNU C++14 TESTS 72 811 41267200
125414935 18380120126 D Aug. 9, 2021, 6:57 p.m. OK GNU C++14 TESTS 72 857 46387200
125445791 Iloveelafovever D Aug. 10, 2021, 5:45 a.m. OK GNU C++14 TESTS 72 858 114585600
125415744 18380120126 D Aug. 9, 2021, 7:09 p.m. OK GNU C++14 TESTS 72 873 46387200
125414985 18380120126 D Aug. 9, 2021, 6:58 p.m. OK GNU C++14 TESTS 72 873 46387200
125414852 18380120126 D Aug. 9, 2021, 6:56 p.m. OK GNU C++14 TESTS 72 873 46387200
125445858 bkifhr10 D Aug. 10, 2021, 5:46 a.m. OK GNU C++14 TESTS 72 873 114585600
125414810 18380120126 D Aug. 9, 2021, 6:56 p.m. OK GNU C++14 TESTS 72 888 46387200
125399558 onlytwelveone D Aug. 9, 2021, 4:29 p.m. OK GNU C++17 TESTS 71 436 47820800
125429445 yueyingxiao D Aug. 10, 2021, 1:08 a.m. OK GNU C++17 TESTS 72 530 38809600
125444046 forceac D Aug. 10, 2021, 5:20 a.m. OK GNU C++17 TESTS 72 561 38809600
125441964 niike0goood D Aug. 10, 2021, 4:49 a.m. OK GNU C++17 TESTS 72 577 91136000
125417567 drayc D Aug. 9, 2021, 7:37 p.m. OK GNU C++17 TESTS 72 623 24371200
125444116 forceac D Aug. 10, 2021, 5:21 a.m. OK GNU C++17 TESTS 72 623 38809600
125444076 forceac D Aug. 10, 2021, 5:20 a.m. OK GNU C++17 TESTS 72 638 38809600
125445869 Paul_Liao_1457 D Aug. 10, 2021, 5:46 a.m. OK GNU C++17 TESTS 72 670 36454400
125437299 hoangphuc.194194 D Aug. 10, 2021, 3:31 a.m. OK GNU C++17 TESTS 72 701 33996800
125401506 Aelhurn D Aug. 9, 2021, 4:33 p.m. OK GNU C++17 TESTS 71 701 48128000
125409716 rainboy D Aug. 9, 2021, 6 p.m. OK GNU C++17 (64) TESTS 72 483 25497600
125399936 TotallyNotAnAlt D Aug. 9, 2021, 4:30 p.m. OK GNU C++17 (64) TESTS 71 483 101580800
125429502 yueyingxiao D Aug. 10, 2021, 1:09 a.m. OK GNU C++17 (64) TESTS 72 514 43417600
125411056 kaiboy D Aug. 9, 2021, 6:12 p.m. OK GNU C++17 (64) TESTS 72 576 38195200
125405232 Vasyl_Protsiv D Aug. 9, 2021, 5:28 p.m. OK GNU C++17 (64) TESTS 71 592 94617600
125401672 DmitryLzr D Aug. 9, 2021, 4:33 p.m. OK GNU C++17 (64) TESTS 71 608 52019200
125418692 rgnerdplayer D Aug. 9, 2021, 7:56 p.m. OK GNU C++17 (64) TESTS 72 623 44032000
125416993 Linkus D Aug. 9, 2021, 7:28 p.m. OK GNU C++17 (64) TESTS 72 639 70451200
125427145 mjtai D Aug. 10, 2021, 12:04 a.m. OK GNU C++17 (64) TESTS 72 686 83046400
125412245 thomas_li D Aug. 9, 2021, 6:25 p.m. OK GNU C++17 (64) TESTS 72 748 49971200
125408260 Dukkha D Aug. 9, 2021, 5:47 p.m. OK Java 11 TESTS 72 1403 68812800
125408915 Katushechka D Aug. 9, 2021, 5:53 p.m. OK Java 11 TESTS 72 1887 116736000
125409421 Katushechka D Aug. 9, 2021, 5:57 p.m. OK Java 11 TESTS 72 2495 146329600
125408901 Katushechka D Aug. 9, 2021, 5:53 p.m. OK Java 8 TESTS 72 1808 116633600
125399504 Katushechka D Aug. 9, 2021, 4:29 p.m. OK Java 8 TESTS 72 2496 145817600
125405438 LoadinGG D Aug. 9, 2021, 5:29 p.m. OK MS C++ 2017 TESTS 71 1825 100352000
125426594 mban259 D Aug. 9, 2021, 11:44 p.m. OK .NET Core C# TESTS 72 1949 118067200
125410440 apilat D Aug. 9, 2021, 6:06 p.m. OK Rust TESTS 72 1263 50380800

remove filters

Back to search problems