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 |
---|---|---|---|---|---|---|
1841 | Educational Codeforces Round 150 (Rated for Div. 2) | FINISHED | False | 7200 | 50599463 | June 12, 2023, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 4556 ) | D | Pairs of Segments | PROGRAMMING | data structures dp greedy sortings |
B'Two segments [l_1, r_1] and [l_2, r_2] intersect if there exists at least one x such that l_1 <= x <= r_1 and l_2 <= x <= r_2 . An array of segments [[l_1, r_1], [l_2, r_2], ... , [l_k, r_k]] is called beautiful if k is even, and is possible to split the elements of this array into frac{k}{2} pairs in such a way that: For example, the array [[2, 4], [9, 12], [2, 4], [7, 7], [10, 13], [6, 8]] is beautiful, since it is possible to form 3 pairs as follows: As you can see, the segments in each pair intersect, and no segments from different pairs intersect. You are given an array of n segments [[l_1, r_1], [l_2, r_2], ... , [l_n, r_n]] . You have to remove the minimum possible number of elements from this array so that the resulting array is beautiful. The first line contains one integer t ( 1 <= t <= 1000 ) -- the number of test cases. The first line of each test case contains one integer n ( 2 <= n <= 2000 ) -- the number of segments in the array. Then, n lines follow, the i -th of them contains two integers l_i and r_i ( 0 <= l_i <= r_i <= 10^9 ) denoting the i -th segment. Additional constraint on the input: the sum of n over all test cases does not exceed 2000 . For each test case, print one integer -- the minimum number of elements you have to remove so that the resulting array is beautiful. In the first test case of the example, it is enough to delete the 5 -th element of the array of segments. Then you get the array [[2, 4], [9, 12], [2, 4], [7, 7], [10, 13], [6, 8]] , which is beautiful. In the second test case of the example, you can delete the 1 -st, 3 -rd and 4 -th element of the array. Then you get the array [[2, 8], [5, 6]] , which is beautiful. In the third test case of the example, you have to delete the whole array. '... |
117262 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
209511861 | ajaman190 | D | June 13, 2023, 3:01 a.m. | OK | GNU C++14 | TESTS | 20 | 15 | 0 | ||
209496860 | sakurasonic | D | June 12, 2023, 8:45 p.m. | OK | GNU C++14 | TESTS | 20 | 15 | 0 | ||
209477324 | RobertoFirmino | D | June 12, 2023, 5:02 p.m. | OK | GNU C++14 | TESTS | 20 | 15 | 0 | ||
209477162 | RobertoFirmino | D | June 12, 2023, 5:01 p.m. | OK | GNU C++14 | TESTS | 20 | 15 | 0 | ||
209472059 | huntermarchi | D | June 12, 2023, 4:34 p.m. | OK | GNU C++14 | TESTS | 20 | 15 | 0 | ||
209470747 | huntermarchi | D | June 12, 2023, 4:33 p.m. | OK | GNU C++14 | TESTS | 20 | 15 | 0 | ||
209503306 | TrendBattles | D | June 12, 2023, 11:43 p.m. | OK | GNU C++14 | TESTS | 20 | 15 | 102400 | ||
209479860 | rkkashyap390 | D | June 12, 2023, 5:21 p.m. | OK | GNU C++14 | TESTS | 20 | 15 | 102400 | ||
209475361 | FishAndCat | D | June 12, 2023, 4:50 p.m. | OK | GNU C++14 | TESTS | 20 | 15 | 102400 | ||
209500750 | Ahmed_Solyman | D | June 12, 2023, 10:14 p.m. | OK | GNU C++14 | TESTS | 20 | 15 | 204800 | ||
209519988 | Luca | D | June 13, 2023, 5:26 a.m. | OK | GNU C++17 | TESTS | 20 | 15 | 0 | ||
209519083 | becaido | D | June 13, 2023, 5:13 a.m. | OK | GNU C++17 | TESTS | 20 | 15 | 0 | ||
209493008 | kingofpineapples | D | June 12, 2023, 7:42 p.m. | OK | GNU C++17 | TESTS | 20 | 15 | 0 | ||
209490997 | ayush_raj.21 | D | June 12, 2023, 7:14 p.m. | OK | GNU C++17 | TESTS | 20 | 15 | 0 | ||
209478715 | 4501_karan | D | June 12, 2023, 5:12 p.m. | OK | GNU C++17 | TESTS | 20 | 15 | 0 | ||
209478523 | justpr | D | June 12, 2023, 5:10 p.m. | OK | GNU C++17 | TESTS | 20 | 15 | 0 | ||
209472420 | Redcrown | D | June 12, 2023, 4:36 p.m. | OK | GNU C++17 | TESTS | 20 | 15 | 0 | ||
209472403 | Alphx | D | June 12, 2023, 4:36 p.m. | OK | GNU C++17 | TESTS | 20 | 15 | 0 | ||
209471118 | Kanika__bansal | D | June 12, 2023, 4:33 p.m. | OK | GNU C++17 | TESTS | 20 | 15 | 0 | ||
209470984 | PrincePanwar | D | June 12, 2023, 4:33 p.m. | OK | GNU C++17 | TESTS | 20 | 15 | 0 | ||
209512843 | Once_I_Liked_AGirl | D | June 13, 2023, 3:19 a.m. | OK | GNU C++17 (64) | TESTS | 20 | 15 | 0 | ||
209507562 | Liam_Evander | D | June 13, 2023, 1:47 a.m. | OK | GNU C++17 (64) | TESTS | 20 | 15 | 0 | ||
209493353 | placik | D | June 12, 2023, 7:47 p.m. | OK | GNU C++17 (64) | TESTS | 20 | 15 | 0 | ||
209492284 | haengsyo | D | June 12, 2023, 7:32 p.m. | OK | GNU C++17 (64) | TESTS | 20 | 15 | 0 | ||
209491152 | ankancool | D | June 12, 2023, 7:16 p.m. | OK | GNU C++17 (64) | TESTS | 20 | 15 | 0 | ||
209482663 | vilc | D | June 12, 2023, 5:47 p.m. | OK | GNU C++17 (64) | TESTS | 20 | 15 | 0 | ||
209478740 | TypeYippie | D | June 12, 2023, 5:12 p.m. | OK | GNU C++17 (64) | TESTS | 20 | 15 | 0 | ||
209470706 | AsmaKhan | D | June 12, 2023, 4:33 p.m. | OK | GNU C++17 (64) | TESTS | 20 | 15 | 0 | ||
209512327 | Linver | D | June 13, 2023, 3:09 a.m. | OK | GNU C++17 (64) | TESTS | 20 | 15 | 102400 | ||
209487179 | monkey8 | D | June 12, 2023, 6:31 p.m. | OK | GNU C++17 (64) | TESTS | 20 | 15 | 102400 | ||
209486418 | mym0404 | D | June 12, 2023, 6:23 p.m. | OK | GNU C++20 (64) | TESTS | 20 | 0 | 102400 | ||
209495401 | anjkk01 | D | June 12, 2023, 8:19 p.m. | OK | GNU C++20 (64) | TESTS | 20 | 0 | 204800 | ||
209471073 | masood_ | D | June 12, 2023, 4:33 p.m. | OK | GNU C++20 (64) | TESTS | 20 | 0 | 204800 | ||
209520328 | orz_z | D | June 13, 2023, 5:31 a.m. | OK | GNU C++20 (64) | TESTS | 20 | 15 | 0 | ||
209517228 | linearRegression | D | June 13, 2023, 4:35 a.m. | OK | GNU C++20 (64) | TESTS | 20 | 15 | 0 | ||
209514752 | Anurag203 | D | June 13, 2023, 3:53 a.m. | OK | GNU C++20 (64) | TESTS | 20 | 15 | 0 | ||
209513698 | Thallium54 | D | June 13, 2023, 3:35 a.m. | OK | GNU C++20 (64) | TESTS | 20 | 15 | 0 | ||
209513270 | chinaN0.1 | D | June 13, 2023, 3:27 a.m. | OK | GNU C++20 (64) | TESTS | 20 | 15 | 0 | ||
209512323 | kcudcigam | D | June 13, 2023, 3:09 a.m. | OK | GNU C++20 (64) | TESTS | 20 | 15 | 0 | ||
209510207 | vivek2943 | D | June 13, 2023, 2:33 a.m. | OK | GNU C++20 (64) | TESTS | 20 | 15 | 0 | ||
209519972 | 0x3F | D | June 13, 2023, 5:25 a.m. | OK | Go | TESTS | 20 | 15 | 204800 | ||
209515683 | 0x3F | D | June 13, 2023, 4:08 a.m. | OK | Go | TESTS | 20 | 31 | 204800 | ||
209494446 | liangjiahui11 | D | June 12, 2023, 8:03 p.m. | OK | Go | TESTS | 20 | 46 | 512000 | ||
209490803 | djrfrn | D | June 12, 2023, 7:12 p.m. | OK | Java 11 | TESTS | 20 | 187 | 0 | ||
209492496 | butteronpoptart | D | June 12, 2023, 7:35 p.m. | OK | Java 11 | TESTS | 20 | 420 | 79462400 | ||
209474838 | lemon_codes | D | June 12, 2023, 4:48 p.m. | OK | Java 17 | TESTS | 20 | 202 | 1126400 | ||
209473232 | ffaann | D | June 12, 2023, 4:39 p.m. | OK | Java 17 | TESTS | 20 | 217 | 1126400 | ||
209474451 | lemon_codes | D | June 12, 2023, 4:45 p.m. | OK | Java 17 | TESTS | 20 | 233 | 1024000 | ||
209513855 | xiaoshua | D | June 13, 2023, 3:38 a.m. | OK | Java 8 | TESTS | 20 | 156 | 0 | ||
209473588 | cc4414 | D | June 12, 2023, 4:40 p.m. | OK | Java 8 | TESTS | 20 | 248 | 0 | ||
209471578 | The_terminator | D | June 12, 2023, 4:34 p.m. | OK | Java 8 | TESTS | 20 | 342 | 0 | ||
209520599 | I_Need_Alex_R_Coleman | D | June 13, 2023, 5:34 a.m. | OK | Java 8 | TESTS | 20 | 1590 | 0 | ||
209478449 | yuki_keshiki | D | June 12, 2023, 5:10 p.m. | OK | PyPy 3-64 | TESTS | 20 | 93 | 4710400 | ||
209499173 | RobinFromTheHood | D | June 12, 2023, 9:34 p.m. | OK | PyPy 3-64 | TESTS | 20 | 93 | 4812800 | ||
209499281 | RobinFromTheHood | D | June 12, 2023, 9:37 p.m. | OK | PyPy 3-64 | TESTS | 20 | 108 | 4812800 | ||
209509553 | xxh1999 | D | June 13, 2023, 2:22 a.m. | OK | PyPy 3-64 | TESTS | 20 | 109 | 5222400 | ||
209498400 | SoleProprietor | D | June 12, 2023, 9:17 p.m. | OK | PyPy 3-64 | TESTS | 20 | 124 | 4710400 | ||
209496051 | RobinFromTheHood | D | June 12, 2023, 8:30 p.m. | OK | PyPy 3-64 | TESTS | 20 | 124 | 5632000 | ||
209496433 | RobinFromTheHood | D | June 12, 2023, 8:36 p.m. | OK | PyPy 3-64 | TESTS | 20 | 140 | 5632000 | ||
209513051 | Little_Sheep_Yawn | D | June 13, 2023, 3:23 a.m. | OK | PyPy 3-64 | TESTS | 20 | 155 | 11776000 | ||
209472375 | 1_2_3_4_5_9 | D | June 12, 2023, 4:36 p.m. | OK | PyPy 3-64 | TESTS | 20 | 171 | 24883200 | ||
209487352 | AyuAnchor | D | June 12, 2023, 6:33 p.m. | OK | PyPy 3-64 | TESTS | 20 | 187 | 8601600 | ||
209507024 | reynaldocv | D | June 13, 2023, 1:36 a.m. | OK | Python 3 | TESTS | 20 | 61 | 921600 | ||
209520675 | klu2100031997 | D | June 13, 2023, 5:36 a.m. | OK | Python 3 | TESTS | 20 | 1013 | 307200 | ||
209498624 | hi_just_chillin | D | June 12, 2023, 9:22 p.m. | OK | Python 3 | TESTS | 20 | 1029 | 307200 | ||
209478732 | YummyPie | D | June 12, 2023, 5:12 p.m. | OK | Rust 2021 | TESTS | 20 | 15 | 0 | ||
209472578 | robostac | D | June 12, 2023, 4:36 p.m. | OK | Rust 2021 | TESTS | 20 | 15 | 307200 |
Back to search problems