Codeforces Round 613 (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
1285 Codeforces Round 613 (Div. 2) FINISHED False 8100 158687711 Jan. 10, 2020, 2:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1864 ) E Delete a Segment PROGRAMMING brute force constructive algorithms data structures dp graphs sortings trees two pointers 2300

B'There are n segments on a Ox axis [l_1, r_1] , [l_2, r_2] , ..., [l_n, r_n] . Segment [l, r] covers all points from l to r inclusive, so all x such that l <= x <= r . Segments can be placed arbitrarily -- be inside each other, coincide and so on. Segments can degenerate into points, that is l_i=r_i is possible. Union of the set of segments is such a set of segments which covers exactly the same set of points as the original set. For example: Obviously, a union is a set of pairwise non-intersecting segments. You are asked to erase exactly one segment of the given n so that the number of segments in the union of the rest n-1 segments is maximum possible. For example, if n=4 and there are segments [1, 4] , [2, 3] , [3, 6] , [5, 7] , then: Thus, you are required to erase the third segment to get answer 2 . Write a program that will find the maximum number of segments in the union of n-1 segments if you erase any of the given n segments. Note that if there are multiple equal segments in the given set, then you can erase only one of them anyway. So the set after erasing will have exactly n-1 segments. The first line contains one integer t ( 1 <= t <= 10^4 ) -- the number of test cases in the test. Then the descriptions of t test cases follow. The first of each test case contains a single integer n ( 2 <= n <= 2 cdot10^5 ) -- the number of segments in the given set. Then n lines follow, each contains a description of a segment -- a pair of integers l_i , r_i ( -10^9 <= l_i <= r_i <= 10^9 ), where l_i and r_i are the coordinates of the left and right borders of the i -th segment, respectively. The segments are given in an arbitrary order. It is guaranteed that the sum of n over all test cases does not exceed 2 cdot10^5 . Print t integers -- the a'...

Tutorials

Codeforces Round #613 (Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
68549633 iica E Jan. 10, 2020, 4:06 p.m. OK D TESTS 31 576 73625600 2300
68541992 mikeCAT E Jan. 10, 2020, 3:40 p.m. OK GNU C11 TESTS 31 327 20889600 2300
68585288 Lanly E Jan. 11, 2020, 11:06 a.m. OK GNU C++11 TESTS 32 61 3174400 2300
68594926 orzccz E Jan. 11, 2020, 1:46 p.m. OK GNU C++11 TESTS 33 62 1433600 2300
68644975 ddytxdy E Jan. 12, 2020, 8:46 a.m. OK GNU C++11 TESTS 33 62 2457600 2300
68649546 nantf E Jan. 12, 2020, 10:17 a.m. OK GNU C++11 TESTS 33 62 10649600 2300
68553202 qkoqhh E Jan. 10, 2020, 4:17 p.m. OK GNU C++11 TESTS 31 78 7987200 2300
68788910 cddchen E Jan. 14, 2020, 2:58 p.m. OK GNU C++11 TESTS 33 93 1638400 2300
68893988 daifucong E Jan. 16, 2020, 3:36 a.m. OK GNU C++11 TESTS 33 93 2457600 2300
68939406 For_Love E Jan. 16, 2020, 1:55 p.m. OK GNU C++11 TESTS 33 93 2457600 2300
68612277 The.Last.Wizard E Jan. 11, 2020, 4:09 p.m. OK GNU C++11 TESTS 33 93 4812800 2300
68656707 dagnaf E Jan. 12, 2020, 12:27 p.m. OK GNU C++11 TESTS 33 108 6246400 2300
69294619 CitricAcid E Jan. 22, 2020, 11:42 a.m. OK GNU C++14 TESTS 33 124 3993600 2300
69294564 CitricAcid E Jan. 22, 2020, 11:41 a.m. OK GNU C++14 TESTS 33 124 3993600 2300
69400774 want20 E Jan. 23, 2020, 8:40 a.m. OK GNU C++14 TESTS 33 124 3993600 2300
68618583 xvenom99 E Jan. 11, 2020, 6:30 p.m. OK GNU C++14 TESTS 33 124 6860800 2300
68843247 jkchen E Jan. 15, 2020, 6:33 a.m. OK GNU C++14 TESTS 33 139 3993600 2300
68540222 gyulla E Jan. 10, 2020, 3:34 p.m. OK GNU C++14 TESTS 31 139 3993600 2300
69294821 CitricAcid E Jan. 22, 2020, 11:47 a.m. OK GNU C++14 TESTS 33 139 3993600 2300
68933637 sfy E Jan. 16, 2020, 12:07 p.m. OK GNU C++14 TESTS 33 140 2457600 2300
68704450 rfpermen E Jan. 13, 2020, 10:43 a.m. OK GNU C++14 TESTS 33 140 4812800 2300
68566591 Mahan_shi E Jan. 10, 2020, 9:47 p.m. OK GNU C++14 TESTS 31 140 6451200 2300
68630557 Funny_digit E Jan. 12, 2020, 2:31 a.m. OK GNU C++17 TESTS 33 93 1638400 2300
68571070 wa006 E Jan. 11, 2020, 2:17 a.m. OK GNU C++17 TESTS 31 124 1638400 2300
69507430 vannamsc E Jan. 25, 2020, 9:13 a.m. OK GNU C++17 TESTS 33 124 1638400 2300
69077146 penguin1017 E Jan. 19, 2020, 4:10 a.m. OK GNU C++17 TESTS 33 124 6758400 2300
68527205 Medeowex E Jan. 10, 2020, 2:58 p.m. OK GNU C++17 TESTS 31 140 4812800 2300
69083416 Magicdog_Jo E Jan. 19, 2020, 7:21 a.m. OK GNU C++17 TESTS 33 140 5632000 2300
68522522 KrK E Jan. 10, 2020, 2:47 p.m. OK GNU C++17 TESTS 31 140 6451200 2300
68698939 vjudge3 E Jan. 13, 2020, 8:49 a.m. OK GNU C++17 TESTS 33 155 3174400 2300
68570049 ZloyNegr E Jan. 11, 2020, 1:29 a.m. OK GNU C++17 TESTS 31 155 3174400 2300
68632295 GaryMr E Jan. 12, 2020, 3:41 a.m. OK GNU C++17 TESTS 33 155 5632000 2300
68990396 NotNight E Jan. 17, 2020, 1:58 p.m. OK Go TESTS 33 296 22835200 2300
68553741 u1s1reallycai E Jan. 10, 2020, 4:19 p.m. OK Go TESTS 31 421 5324800 2300
68641393 ccsu_cat_love_jiejie E Jan. 12, 2020, 7:38 a.m. OK Go TESTS 33 467 45056000 2300
68542293 Nutella3000 E Jan. 10, 2020, 3:41 p.m. OK Java 8 TESTS 31 295 0 2300
69004600 unicorn20141 E Jan. 17, 2020, 9:55 p.m. OK Java 8 TESTS 33 436 18636800 2300
68566884 polyakoff E Jan. 10, 2020, 10:02 p.m. OK Java 8 TESTS 31 467 5324800 2300
68566860 polyakoff E Jan. 10, 2020, 10:01 p.m. OK Java 8 TESTS 31 483 5324800 2300
68566920 polyakoff E Jan. 10, 2020, 10:04 p.m. OK Java 8 TESTS 31 514 5017600 2300
68662573 Megabyte E Jan. 12, 2020, 2:06 p.m. OK Java 8 TESTS 33 639 38502400 2300
68634081 luchy0120 E Jan. 12, 2020, 4:55 a.m. OK Java 8 TESTS 33 654 20480000 2300
68634889 luchy0120 E Jan. 12, 2020, 5:20 a.m. OK Java 8 TESTS 33 670 20480000 2300
68668239 Katushechka E Jan. 12, 2020, 3:54 p.m. OK Java 8 TESTS 33 701 47923200 2300
68568278 about E Jan. 10, 2020, 11:32 p.m. OK Java 8 TESTS 31 717 28979200 2300
69256158 Spheniscine E Jan. 21, 2020, 3:43 p.m. OK Kotlin TESTS 33 452 7065600 2300
68534709 elizarov E Jan. 10, 2020, 3:18 p.m. OK Kotlin TESTS 31 1201 65843200 2300
69183005 vjudge4 E Jan. 20, 2020, 10:56 a.m. OK MS C++ TESTS 33 452 11264000 2300
69447568 wjsrptmd E Jan. 24, 2020, 4:13 a.m. OK MS C++ 2017 TESTS 33 280 2457600 2300
68671595 omerb.zeybek E Jan. 12, 2020, 5:02 p.m. OK MS C++ 2017 TESTS 33 420 2662400 2300
68547223 AlexanderL E Jan. 10, 2020, 3:58 p.m. OK MS C++ 2017 TESTS 31 467 5120000 2300
68868087 Jonte_98 E Jan. 15, 2020, 2:13 p.m. OK PyPy 2 TESTS 33 1747 62771200 2300
68690541 MVP E Jan. 13, 2020, 5:54 a.m. OK PyPy 2 TESTS 33 1965 79052800 2300
68551010 jakethekoenig E Jan. 10, 2020, 4:11 p.m. OK PyPy 3 TESTS 31 1404 47104000 2300
69587588 titia E Jan. 26, 2020, 8:22 p.m. OK PyPy 3 TESTS 33 1528 78745600 2300
68624844 malylesio E Jan. 11, 2020, 8:59 p.m. OK PyPy 3 TESTS 33 1715 77721600 2300
68837215 macleChen E Jan. 15, 2020, 3:56 a.m. OK PyPy 3 TESTS 33 1778 51916800 2300
69589772 titia E Jan. 26, 2020, 10:08 p.m. OK PyPy 3 TESTS 33 1794 28569600 2300
68591856 mitribunskiy E Jan. 11, 2020, 12:53 p.m. OK PyPy 3 TESTS 33 2058 44339200 2300
68557485 Tschech E Jan. 10, 2020, 6:02 p.m. OK PyPy 3 TESTS 31 2168 64102400 2300
68583510 addammy E Jan. 11, 2020, 10:40 a.m. OK PyPy 3 TESTS 31 3151 50380800 2300
68530549 nwi E Jan. 10, 2020, 3:06 p.m. OK Python 2 TESTS 31 2449 158515200 2300
68561132 r57shell E Jan. 10, 2020, 6:59 p.m. OK Python 3 TESTS 31 1731 75161600 2300
68534850 tuna_salad E Jan. 10, 2020, 3:18 p.m. OK Rust TESTS 31 1169 141619200 2300

remove filters

Back to search problems