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 |
---|---|---|---|---|---|---|
1551 | Codeforces Round 734 (Div. 3) | FINISHED | False | 7200 | 110129063 | July 23, 2021, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 4033 ) | E | Fixed Points | PROGRAMMING | brute force dp |
B"Consider a sequence of integers a_1, a_2, ldots, a_n . In one move, you can select any element of the sequence and delete it. After an element is deleted, all elements to the right are shifted to the left by 1 position, so there are no empty spaces in the sequence. So after you make a move, the sequence's length decreases by 1 . The indices of the elements after the move are recalculated. E. xe2 x80 x89g. let the sequence be a=[3, 2, 2, 1, 5] . Let's select the element a_3=2 in a move. Then after the move the sequence will be equal to a=[3, 2, 1, 5] , so the 3 -rd element of the new sequence will be a_3=1 and the 4 -th element will be a_4=5 . You are given a sequence a_1, a_2, ldots, a_n and a number k . You need to find the minimum number of moves you have to make so that in the resulting sequence there will be at least k elements that are equal to their indices, i. xe2 x80 x89e. the resulting sequence b_1, b_2, ldots, b_m will contain at least k indices i such that b_i = i . The first line contains one integer t ( 1 <= t <= 100 ) -- the number of test cases. Then t test cases follow. Each test case consists of two consecutive lines. The first line contains two integers n and k ( 1 <= k <= n <= 2000 ). The second line contains a sequence of integers a_1, a_2, ldots, a_n ( 1 <= a_i <= n ). The numbers in the sequence are not necessarily different. It is guaranteed that the sum of n over all test cases doesn't exceed 2000 . For each test case output in a single line: In the first test case the sequence doesn't satisfy the desired condition, but it can be provided by deleting the first element, hence the sequence will be [1, 2, 3, 4, 5, 6] and 6 elements will be equal to their indices. In the second test case there are two ways to get the desired result in 2 moves: the first one is to delete the 1 "... |
Editorial for Codeforces Round #734 (Div.3) |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
123527690 | keywet06 | E | July 23, 2021, 4:34 p.m. | OK | GNU C++11 | TESTS | 11 | 15 | 20070400 | ||
123568584 | Kaeru | E | July 24, 2021, 4:32 a.m. | OK | GNU C++11 | TESTS | 11 | 15 | 21196800 | ||
123560761 | HollwoQ_Pelw | E | July 24, 2021, 2:17 a.m. | OK | GNU C++11 | TESTS | 11 | 30 | 3686400 | ||
123566155 | casul | E | July 24, 2021, 3:49 a.m. | OK | GNU C++11 | TESTS | 11 | 30 | 3891200 | ||
123556388 | caidd | E | July 24, 2021, 12:30 a.m. | OK | GNU C++11 | TESTS | 11 | 30 | 3891200 | ||
123566866 | PsephurusGladius | E | July 24, 2021, 4:01 a.m. | OK | GNU C++11 | TESTS | 11 | 30 | 19763200 | ||
123533050 | animenz | E | July 23, 2021, 5:04 p.m. | OK | GNU C++11 | TESTS | 11 | 30 | 20070400 | ||
123566624 | fishcathu. | E | July 24, 2021, 3:56 a.m. | OK | GNU C++11 | TESTS | 11 | 30 | 20070400 | ||
123555973 | et3_tsy3.0 | E | July 24, 2021, 12:12 a.m. | OK | GNU C++11 | TESTS | 11 | 30 | 21708800 | ||
123531819 | cunzai_zsy0531 | E | July 23, 2021, 4:54 p.m. | OK | GNU C++11 | TESTS | 11 | 31 | 3891200 | ||
123533508 | I_francis | E | July 23, 2021, 5:08 p.m. | OK | GNU C++14 | TESTS | 11 | 30 | 19865600 | ||
123538318 | EfuX | E | July 23, 2021, 6:02 p.m. | OK | GNU C++14 | TESTS | 11 | 31 | 3788800 | ||
123562693 | JinerGenkai | E | July 24, 2021, 2:52 a.m. | OK | GNU C++14 | TESTS | 11 | 31 | 3788800 | ||
123526017 | Electron | E | July 23, 2021, 4:32 p.m. | OK | GNU C++14 | TESTS | 11 | 31 | 3891200 | ||
123531292 | bqq | E | July 23, 2021, 4:51 p.m. | OK | GNU C++14 | TESTS | 11 | 31 | 19865600 | ||
123571841 | Ichimaru31 | E | July 24, 2021, 5:26 a.m. | OK | GNU C++14 | TESTS | 11 | 31 | 19865600 | ||
123563381 | GeZhiyuan | E | July 24, 2021, 3:03 a.m. | OK | GNU C++14 | TESTS | 11 | 31 | 19865600 | ||
123527791 | K-DA | E | July 23, 2021, 4:34 p.m. | OK | GNU C++14 | TESTS | 11 | 31 | 19865600 | ||
123566323 | Kutori_ | E | July 24, 2021, 3:52 a.m. | OK | GNU C++14 | TESTS | 11 | 31 | 19968000 | ||
123561859 | Aestas16 | E | July 24, 2021, 2:38 a.m. | OK | GNU C++14 | TESTS | 11 | 31 | 19968000 | ||
123570408 | stupidgoat | E | July 24, 2021, 5:04 a.m. | OK | GNU C++17 | TESTS | 11 | 15 | 3788800 | ||
123560146 | DHNB666 | E | July 24, 2021, 2:05 a.m. | OK | GNU C++17 | TESTS | 11 | 15 | 3891200 | ||
123526358 | KYAron | E | July 23, 2021, 4:32 p.m. | OK | GNU C++17 | TESTS | 11 | 15 | 19865600 | ||
123557828 | 2548631 | E | July 24, 2021, 1:12 a.m. | OK | GNU C++17 | TESTS | 11 | 15 | 19865600 | ||
123538508 | 1127193030 | E | July 23, 2021, 6:05 p.m. | OK | GNU C++17 | TESTS | 11 | 15 | 19865600 | ||
123538421 | amano_hina | E | July 23, 2021, 6:03 p.m. | OK | GNU C++17 | TESTS | 11 | 15 | 156876800 | ||
123530942 | TISparta | E | July 23, 2021, 4:48 p.m. | OK | GNU C++17 | TESTS | 11 | 30 | 3891200 | ||
123541927 | itsronaldo | E | July 23, 2021, 6:48 p.m. | OK | GNU C++17 | TESTS | 11 | 30 | 3891200 | ||
123530838 | Yomapeed | E | July 23, 2021, 4:48 p.m. | OK | GNU C++17 | TESTS | 11 | 30 | 3891200 | ||
123537184 | lewinlight1202 | E | July 23, 2021, 5:48 p.m. | OK | GNU C++17 | TESTS | 11 | 30 | 11776000 | ||
123560463 | HollwoQ_Pelw | E | July 24, 2021, 2:12 a.m. | OK | GNU C++17 (64) | TESTS | 11 | 15 | 4198400 | ||
123551628 | Crocuta | E | July 23, 2021, 9:35 p.m. | OK | GNU C++17 (64) | TESTS | 11 | 15 | 4300800 | ||
123570849 | udon1206 | E | July 24, 2021, 5:10 a.m. | OK | GNU C++17 (64) | TESTS | 11 | 15 | 4300800 | ||
123555516 | Huangjianheng | E | July 23, 2021, 11:51 p.m. | OK | GNU C++17 (64) | TESTS | 11 | 15 | 4300800 | ||
123550142 | Auriels_Ascension | E | July 23, 2021, 8:58 p.m. | OK | GNU C++17 (64) | TESTS | 11 | 15 | 4300800 | ||
123535383 | Gravekper | E | July 23, 2021, 5:26 p.m. | OK | GNU C++17 (64) | TESTS | 11 | 15 | 4300800 | ||
123567524 | akshaykhandelwal | E | July 24, 2021, 4:13 a.m. | OK | GNU C++17 (64) | TESTS | 11 | 15 | 4403200 | ||
123569742 | Soumya1 | E | July 24, 2021, 4:53 a.m. | OK | GNU C++17 (64) | TESTS | 11 | 15 | 21606400 | ||
123529445 | ScarletS | E | July 23, 2021, 4:40 p.m. | OK | GNU C++17 (64) | TESTS | 11 | 15 | 21606400 | ||
123554497 | tomato_potato | E | July 23, 2021, 11:05 p.m. | OK | GNU C++17 (64) | TESTS | 11 | 15 | 37683200 | ||
123567021 | 0x3F | E | July 24, 2021, 4:04 a.m. | OK | Go | TESTS | 11 | 31 | 29593600 | ||
123567034 | 0x3F | E | July 24, 2021, 4:04 a.m. | OK | Go | TESTS | 11 | 46 | 25190400 | ||
123566408 | 0x3F | E | July 24, 2021, 3:53 a.m. | OK | Go | TESTS | 11 | 46 | 29593600 | ||
123566693 | 0x3F | E | July 24, 2021, 3:57 a.m. | OK | Go | TESTS | 11 | 46 | 29593600 | ||
123526943 | WardellCurry | E | July 23, 2021, 4:33 p.m. | OK | Java 11 | TESTS | 11 | 217 | 42803200 | ||
123535403 | Dukkha | E | July 23, 2021, 5:27 p.m. | OK | Java 11 | TESTS | 11 | 218 | 24371200 | ||
123538397 | Okhair | E | July 23, 2021, 6:03 p.m. | OK | Java 11 | TESTS | 11 | 560 | 43212800 | ||
123569005 | jamesfan961101 | E | July 24, 2021, 4:39 a.m. | OK | Java 11 | TESTS | 11 | 685 | 47513600 | ||
123553503 | hu_tao | E | July 23, 2021, 10:30 p.m. | OK | Java 8 | TESTS | 11 | 124 | 39833600 | ||
123530945 | Frank0628 | E | July 23, 2021, 4:48 p.m. | OK | Java 8 | TESTS | 11 | 124 | 39833600 | ||
123549454 | YahiaSherif | E | July 23, 2021, 8:44 p.m. | OK | Java 8 | TESTS | 11 | 155 | 39833600 | ||
123544706 | Dstoical | E | July 23, 2021, 7:27 p.m. | OK | Java 8 | TESTS | 11 | 171 | 39731200 | ||
123535078 | Hakiobo | E | July 23, 2021, 5:23 p.m. | OK | Kotlin | TESTS | 11 | 124 | 20889600 | ||
123526360 | koper | E | July 23, 2021, 4:32 p.m. | OK | Kotlin | TESTS | 11 | 140 | 21504000 | ||
123535947 | tokitsukaze | E | July 23, 2021, 5:33 p.m. | OK | Kotlin | TESTS | 11 | 155 | 21811200 | ||
123542648 | danilgrig | E | July 23, 2021, 6:59 p.m. | OK | MS C++ 2017 | TESTS | 11 | 31 | 3686400 | ||
123552076 | grey | E | July 23, 2021, 9:47 p.m. | OK | MS C++ 2017 | TESTS | 11 | 685 | 21094400 | ||
123546591 | silvertint | E | July 23, 2021, 7:54 p.m. | OK | PyPy 3 | TESTS | 11 | 171 | 39833600 | ||
123542682 | gourav2001k | E | July 23, 2021, 6:59 p.m. | OK | PyPy 3 | TESTS | 11 | 171 | 40550400 | ||
123572971 | akanodia11 | E | July 24, 2021, 5:43 a.m. | OK | PyPy 3 | TESTS | 11 | 186 | 40140800 | ||
123543159 | KanishkGoel | E | July 23, 2021, 7:06 p.m. | OK | PyPy 3 | TESTS | 11 | 186 | 40243200 | ||
123564894 | srijan.sarkar | E | July 24, 2021, 3:30 a.m. | OK | PyPy 3 | TESTS | 11 | 187 | 40038400 | ||
123533236 | hxu10 | E | July 23, 2021, 5:06 p.m. | OK | PyPy 3 | TESTS | 11 | 296 | 34201600 | ||
123548364 | anishde85 | E | July 23, 2021, 8:23 p.m. | OK | PyPy 3 | TESTS | 11 | 467 | 245145600 | ||
123539488 | r57shell | E | July 23, 2021, 6:17 p.m. | OK | Python 3 | TESTS | 11 | 717 | 6963200 | ||
123528709 | zheland | E | July 23, 2021, 4:37 p.m. | OK | Rust | TESTS | 11 | 31 | 19865600 | ||
123527029 | cottoncotton | E | July 23, 2021, 4:33 p.m. | OK | Rust | TESTS | 11 | 46 | 20889600 | ||
123561282 | bqn | E | July 24, 2021, 2:27 a.m. | OK | Rust | TESTS | 11 | 46 | 36147200 |
Back to search problems