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 |
---|---|---|---|---|---|---|
1463 | Educational Codeforces Round 100 (Rated for Div. 2) | FINISHED | False | 7200 | 123607499 | Dec. 17, 2020, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 4461 ) | D | Pairs | PROGRAMMING | binary search constructive algorithms greedy |
B"You have 2n integers 1, 2, ... , 2n . You have to redistribute these 2n elements into n pairs. After that, you choose x pairs and take minimum elements from them, and from the other n - x pairs, you take maximum elements. Your goal is to obtain the set of numbers {b_1, b_2, ... , b_n } as the result of taking elements from the pairs. What is the number of different x -s ( 0 <= x <= n ) such that it's possible to obtain the set b if for each x you can choose how to distribute numbers into pairs and from which x pairs choose minimum elements? The first line contains a single integer t ( 1 <= t <= 1000 ) -- the number of test cases. The first line of each test case contains the integer n ( 1 <= n <= 2 cdot 10^5 ). The second line of each test case contains n integers b_1, b_2, ... , b_n ( 1 <= b_1 < b_2 < ... < b_n <= 2n ) -- the set you'd like to get. It's guaranteed that the sum of n over test cases doesn't exceed 2 cdot 10^5 . For each test case, print one number -- the number of different x -s such that it's possible to obtain the set b . In the first test case, x = 1 is the only option: you have one pair (1, 2) and choose the minimum from this pair. In the second test case, there are three possible x -s. If x = 1 , then you can form the following pairs: (1, 6) , (2, 4) , (3, 5) , (7, 9) , (8, 10) . You can take minimum from (1, 6) (equal to 1 ) and the maximum elements from all other pairs to get set b . If x = 2 , you can form pairs (1, 2) , (3, 4) , (5, 6) , (7, 9) , (8, 10) and take the minimum elements from (1, 2) , (5, 6) and the maximum elements from the other pairs. If x = 3 , you can form pairs (1, 3) , (4, 6) , (5, 7) , (2, 9) , (8, 10) and take the minimum elements f"... |
Educational Codeforces Round 100 Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
101583814 | Dancepted | D | Dec. 17, 2020, 5:17 p.m. | OK | GNU C++11 | TESTS | 11 | 30 | 819200 | ||
101571061 | U25 | D | Dec. 17, 2020, 4:17 p.m. | OK | GNU C++11 | TESTS | 11 | 31 | 1638400 | ||
101585886 | Zechariah_2001 | D | Dec. 17, 2020, 5:46 p.m. | OK | GNU C++11 | TESTS | 11 | 31 | 2048000 | ||
101576388 | guapisolo | D | Dec. 17, 2020, 4:30 p.m. | OK | GNU C++11 | TESTS | 11 | 31 | 2969600 | ||
101573928 | wondover | D | Dec. 17, 2020, 4:24 p.m. | OK | GNU C++11 | TESTS | 11 | 31 | 7782400 | ||
101578584 | zswzswzswzsw | D | Dec. 17, 2020, 4:34 p.m. | OK | GNU C++11 | TESTS | 11 | 31 | 12800000 | ||
101607104 | KillerX | D | Dec. 18, 2020, 4:38 a.m. | OK | GNU C++11 | TESTS | 11 | 46 | 409600 | ||
101578339 | lqx123123 | D | Dec. 17, 2020, 4:34 p.m. | OK | GNU C++11 | TESTS | 11 | 46 | 614400 | ||
101577346 | whatss7 | D | Dec. 17, 2020, 4:32 p.m. | OK | GNU C++11 | TESTS | 11 | 46 | 614400 | ||
101609050 | wwch | D | Dec. 18, 2020, 5:20 a.m. | OK | GNU C++11 | TESTS | 11 | 46 | 819200 | ||
101571153 | Mostafa_ELbadawy2 | D | Dec. 17, 2020, 4:17 p.m. | OK | GNU C++14 | TESTS | 11 | 61 | 1638400 | ||
101571177 | yongjun18 | D | Dec. 17, 2020, 4:17 p.m. | OK | GNU C++14 | TESTS | 11 | 61 | 1843200 | ||
101590272 | 4.5Tatami | D | Dec. 17, 2020, 6:59 p.m. | OK | GNU C++14 | TESTS | 11 | 61 | 3993600 | ||
101576386 | Luzivanlt | D | Dec. 17, 2020, 4:30 p.m. | OK | GNU C++14 | TESTS | 11 | 61 | 4812800 | ||
101592935 | prateek3110 | D | Dec. 17, 2020, 7:56 p.m. | OK | GNU C++14 | TESTS | 11 | 62 | 819200 | ||
101572006 | asfd221 | D | Dec. 17, 2020, 4:19 p.m. | OK | GNU C++14 | TESTS | 11 | 62 | 819200 | ||
101596863 | guestIT | D | Dec. 17, 2020, 9:45 p.m. | OK | GNU C++14 | TESTS | 11 | 62 | 1228800 | ||
101611220 | skizajurrahaman | D | Dec. 18, 2020, 5:55 a.m. | OK | GNU C++14 | TESTS | 11 | 62 | 1638400 | ||
101582311 | SuperJ6 | D | Dec. 17, 2020, 5:01 p.m. | OK | GNU C++14 | TESTS | 11 | 62 | 1638400 | ||
101577800 | Suri321 | D | Dec. 17, 2020, 4:33 p.m. | OK | GNU C++14 | TESTS | 11 | 62 | 1638400 | ||
101577974 | _Backl1ght | D | Dec. 17, 2020, 4:34 p.m. | OK | GNU C++17 | TESTS | 11 | 31 | 11059200 | ||
101602642 | chen_zexing | D | Dec. 18, 2020, 2:33 a.m. | OK | GNU C++17 | TESTS | 11 | 46 | 819200 | ||
101587203 | filippos | D | Dec. 17, 2020, 6:06 p.m. | OK | GNU C++17 | TESTS | 11 | 61 | 819200 | ||
101599979 | vjudge4 | D | Dec. 18, 2020, 12:25 a.m. | OK | GNU C++17 | TESTS | 11 | 61 | 1536000 | ||
101581681 | 214 | D | Dec. 17, 2020, 4:55 p.m. | OK | GNU C++17 | TESTS | 11 | 61 | 3584000 | ||
101581663 | NURcodeAK | D | Dec. 17, 2020, 4:55 p.m. | OK | GNU C++17 | TESTS | 11 | 62 | 0 | ||
101585727 | Omer223 | D | Dec. 17, 2020, 5:44 p.m. | OK | GNU C++17 | TESTS | 11 | 62 | 102400 | ||
101608003 | Czarcasm | D | Dec. 18, 2020, 4:59 a.m. | OK | GNU C++17 | TESTS | 11 | 62 | 204800 | ||
101605499 | Ccucumber12 | D | Dec. 18, 2020, 3:57 a.m. | OK | GNU C++17 | TESTS | 11 | 62 | 819200 | ||
101596845 | wabadabakalakaboo | D | Dec. 17, 2020, 9:45 p.m. | OK | GNU C++17 | TESTS | 11 | 62 | 819200 | ||
101597218 | timf1089 | D | Dec. 17, 2020, 9:58 p.m. | OK | GNU C++17 (64) | TESTS | 11 | 46 | 819200 | ||
101571352 | Sooh31 | D | Dec. 17, 2020, 4:18 p.m. | OK | GNU C++17 (64) | TESTS | 11 | 46 | 819200 | ||
101587244 | scol | D | Dec. 17, 2020, 6:06 p.m. | OK | GNU C++17 (64) | TESTS | 11 | 46 | 921600 | ||
101589850 | june_waves | D | Dec. 17, 2020, 6:50 p.m. | OK | GNU C++17 (64) | TESTS | 11 | 46 | 1638400 | ||
101572184 | Resende | D | Dec. 17, 2020, 4:20 p.m. | OK | GNU C++17 (64) | TESTS | 11 | 46 | 1638400 | ||
101571955 | Heptadecagon | D | Dec. 17, 2020, 4:19 p.m. | OK | GNU C++17 (64) | TESTS | 11 | 46 | 1638400 | ||
101604575 | fatnot | D | Dec. 18, 2020, 3:32 a.m. | OK | GNU C++17 (64) | TESTS | 11 | 46 | 2457600 | ||
101580049 | JustasZ | D | Dec. 17, 2020, 4:43 p.m. | OK | GNU C++17 (64) | TESTS | 11 | 46 | 2457600 | ||
101586749 | bmosocute | D | Dec. 17, 2020, 6 p.m. | OK | GNU C++17 (64) | TESTS | 11 | 46 | 3584000 | ||
101584081 | Nifer | D | Dec. 17, 2020, 5:21 p.m. | OK | GNU C++17 (64) | TESTS | 11 | 46 | 3584000 | ||
101604817 | tusharjape007 | D | Dec. 18, 2020, 3:38 a.m. | OK | Java 11 | TESTS | 11 | 202 | 0 | ||
101595154 | elkadymohammed01 | D | Dec. 17, 2020, 8:53 p.m. | OK | Java 11 | TESTS | 11 | 202 | 0 | ||
101590836 | PratyushS7 | D | Dec. 17, 2020, 7:10 p.m. | OK | Java 11 | TESTS | 11 | 202 | 0 | ||
101572790 | skittles1412 | D | Dec. 17, 2020, 4:21 p.m. | OK | Java 11 | TESTS | 11 | 233 | 0 | ||
101588538 | Haresa | D | Dec. 17, 2020, 6:26 p.m. | OK | Java 11 | TESTS | 11 | 248 | 0 | ||
101594787 | mphillotry | D | Dec. 17, 2020, 8:43 p.m. | OK | Java 11 | TESTS | 11 | 264 | 0 | ||
101575040 | kabirpathak | D | Dec. 17, 2020, 4:27 p.m. | OK | Java 11 | TESTS | 11 | 296 | 29081600 | ||
101571152 | tien-nam | D | Dec. 17, 2020, 4:17 p.m. | OK | Java 11 | TESTS | 11 | 405 | 0 | ||
101574820 | CCS_Covenant | D | Dec. 17, 2020, 4:27 p.m. | OK | Java 11 | TESTS | 11 | 436 | 0 | ||
101573641 | R3KT | D | Dec. 17, 2020, 4:24 p.m. | OK | Java 8 | TESTS | 11 | 202 | 0 | ||
101601177 | kadintang1 | D | Dec. 18, 2020, 1:27 a.m. | OK | Java 8 | TESTS | 11 | 202 | 1843200 | ||
101608975 | kadintang1 | D | Dec. 18, 2020, 5:19 a.m. | OK | Java 8 | TESTS | 11 | 202 | 11878400 | ||
101581256 | subhamdtu | D | Dec. 17, 2020, 4:52 p.m. | OK | Java 8 | TESTS | 11 | 218 | 5939200 | ||
101579244 | notnamed | D | Dec. 17, 2020, 4:38 p.m. | OK | Java 8 | TESTS | 11 | 389 | 0 | ||
101589543 | Life | D | Dec. 17, 2020, 6:44 p.m. | OK | Java 8 | TESTS | 11 | 405 | 27136000 | ||
101576369 | Scotty_pwnz | D | Dec. 17, 2020, 4:30 p.m. | OK | Kotlin | TESTS | 11 | 248 | 15052800 | ||
101573005 | Musin | D | Dec. 17, 2020, 4:22 p.m. | OK | Kotlin | TESTS | 11 | 498 | 61952000 | ||
101570686 | Megalitum | D | Dec. 17, 2020, 4:16 p.m. | OK | MS C++ 2017 | TESTS | 11 | 156 | 1638400 | ||
101576431 | realnimish | D | Dec. 17, 2020, 4:30 p.m. | OK | PyPy 2 | TESTS | 11 | 218 | 15155200 | ||
101576240 | Hitikkumar | D | Dec. 17, 2020, 4:30 p.m. | OK | PyPy 2 | TESTS | 11 | 343 | 16076800 | ||
101584038 | hxu10 | D | Dec. 17, 2020, 5:20 p.m. | OK | PyPy 3 | TESTS | 11 | 218 | 15564800 | ||
101582813 | silvertint | D | Dec. 17, 2020, 5:06 p.m. | OK | PyPy 3 | TESTS | 11 | 265 | 16486400 | ||
101591392 | 11001101 | D | Dec. 17, 2020, 7:21 p.m. | OK | PyPy 3 | TESTS | 11 | 265 | 18841600 | ||
101585850 | Khan17 | D | Dec. 17, 2020, 5:46 p.m. | OK | PyPy 3 | TESTS | 11 | 280 | 18022400 | ||
101571618 | marroncastle | D | Dec. 17, 2020, 4:18 p.m. | OK | PyPy 3 | TESTS | 11 | 280 | 19660800 | ||
101569555 | TheVan | D | Dec. 17, 2020, 4:13 p.m. | OK | PyPy 3 | TESTS | 11 | 280 | 23654400 | ||
101571635 | aberent | D | Dec. 17, 2020, 4:18 p.m. | OK | PyPy 3 | TESTS | 11 | 295 | 14745600 | ||
101602849 | kclee2172 | D | Dec. 18, 2020, 2:40 a.m. | OK | PyPy 3 | TESTS | 11 | 295 | 15155200 | ||
101582956 | silvertint | D | Dec. 17, 2020, 5:07 p.m. | OK | PyPy 3 | TESTS | 11 | 296 | 16179200 | ||
101575967 | at_f | D | Dec. 17, 2020, 4:29 p.m. | OK | PyPy 3 | TESTS | 11 | 296 | 25702400 | ||
101576095 | Hitikkumar | D | Dec. 17, 2020, 4:30 p.m. | OK | Python 2 | TESTS | 11 | 810 | 13107200 | ||
101571289 | GTsan | D | Dec. 17, 2020, 4:18 p.m. | OK | Python 3 | TESTS | 11 | 358 | 14643200 | ||
101587900 | r57shell | D | Dec. 17, 2020, 6:16 p.m. | OK | Python 3 | TESTS | 11 | 405 | 13414400 | ||
101569355 | hdnkt | D | Dec. 17, 2020, 4:13 p.m. | OK | Python 3 | TESTS | 11 | 685 | 14643200 | ||
101580608 | soham_mittal | D | Dec. 17, 2020, 4:47 p.m. | OK | Python 3 | TESTS | 11 | 935 | 14643200 | ||
101590344 | optozorax | D | Dec. 17, 2020, 7 p.m. | OK | Rust | TESTS | 11 | 124 | 4608000 | ||
101590220 | optozorax | D | Dec. 17, 2020, 6:57 p.m. | OK | Rust | TESTS | 11 | 249 | 4608000 |
Back to search problems