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 |
|---|---|---|---|---|---|---|
| 2237 | Order Capital Round 2 (Codeforces Round 1104, Div. 1 + Div. 2) | FINISHED | False | 10800 | 4807484 | June 18, 2026, 2:35 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 949 ) | F | Paint the Array | PROGRAMMING | data structures dp greedy |
Consider an array of length (n), and a fixed integer (m). A painting operation is defined as follows: Choose an interval of length (m) and paint it with the values (1,2,\ldots,m) from left to right. Formally, choose an integer (l) such that (1\le l\le n-m+1). Then, for every (1\le i\le m), position (l+i-1) is painted with value (i). Formally, choose an integer (l) such that (1\le l\le n-m+1). Then, for every (1\le i\le m), position (l+i-1) is painted with value (i). If a position is painted multiple times, only the value painted most recently remains. An array is called valid if it can be obtained by performing some painting operations such that every position is painted at least once . Given an array (a_1,a_2,\ldots,a_n) with (1\le a_i\le m), find the minimum number of modifications needed to make it valid . One modification changes one element to any integer between (1) and (m). Each test contains multiple test cases. The first line contains the number of test cases (t) ((1 \le t \le 10^4)). The description of the test cases follows. The first line of each test case contains two integers (n) and (m) ((1\le m\le n\le 5\cdot 10^5)) — the length of the array and the length of each painted interval. The second line contains (n) integers (a_1,a_2,\ldots,a_n) ((1\le a_i\le m)). It is guaranteed that the sum of (n) over all test cases does not exceed (5\cdot 10^5). For each test case, output a single integer — the minimum number of modifications needed to make it valid . In the transformations below, the underlined positions are exactly the positions painted in the latest operation. In the first test case, the array is already valid . It can be obtained by the following painting operations: () -,-,-,-,-\to-,-,\underline{1},\underline{2},\underline{3}\to\underline{1},\underline{2},\underline{3},2,3. () Therefore no modification is needed, |
| Order Capital Round 2 (Codeforces Round 1104, Div. 1 + Div. 2) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 379425857 | hcng | F | June 18, 2026, 6:30 p.m. | OK | C++17 (GCC 7-32) | TESTS | 63 | 140 | 4096000 | ||
| 379421129 | JaeminPark | F | June 18, 2026, 5:34 p.m. | OK | C++17 (GCC 7-32) | TESTS | 63 | 140 | 10035200 | ||
| 379434014 | AksLolCoding | F | June 18, 2026, 8:58 p.m. | OK | C++17 (GCC 7-32) | TESTS | 63 | 156 | 409600 | ||
| 379410370 | Bubbleawa | F | June 18, 2026, 4:37 p.m. | OK | C++17 (GCC 7-32) | TESTS | 63 | 156 | 8192000 | ||
| 379408265 | hos.lyric | F | June 18, 2026, 4:28 p.m. | OK | C++17 (GCC 7-32) | TESTS | 63 | 203 | 6144000 | ||
| 379403068 | diandian2020 | F | June 18, 2026, 4:08 p.m. | OK | C++17 (GCC 7-32) | TESTS | 63 | 203 | 73216000 | ||
| 379422083 | Tian_Ming_Yo | F | June 18, 2026, 5:48 p.m. | OK | C++17 (GCC 7-32) | TESTS | 63 | 218 | 14233600 | ||
| 379417235 | quanjun | F | June 18, 2026, 5:14 p.m. | OK | C++17 (GCC 7-32) | TESTS | 63 | 218 | 16076800 | ||
| 379427774 | Dimozavr | F | June 18, 2026, 6:58 p.m. | OK | C++17 (GCC 7-32) | TESTS | 63 | 234 | 12185600 | ||
| 379419028 | baycode | F | June 18, 2026, 5:24 p.m. | OK | C++17 (GCC 7-32) | TESTS | 63 | 250 | 10547200 | ||
| 379426208 | PaperCloud | F | June 18, 2026, 6:34 p.m. | OK | C++20 (GCC 13-64) | TESTS | 63 | 109 | 204800 | ||
| 379418771 | Hinanawi-Tenshi | F | June 18, 2026, 5:23 p.m. | OK | C++20 (GCC 13-64) | TESTS | 63 | 109 | 204800 | ||
| 379422117 | YoungLau | F | June 18, 2026, 5:49 p.m. | OK | C++20 (GCC 13-64) | TESTS | 63 | 125 | 4198400 | ||
| 379406827 | -skyline- | F | June 18, 2026, 4:22 p.m. | OK | C++20 (GCC 13-64) | TESTS | 63 | 125 | 6041600 | ||
| 379438545 | FreddieLiu | F | June 18, 2026, 11:40 p.m. | OK | C++20 (GCC 13-64) | TESTS | 63 | 125 | 8089600 | ||
| 379447246 | Shz__ | F | June 19, 2026, 3:41 a.m. | OK | C++20 (GCC 13-64) | TESTS | 63 | 125 | 10035200 | ||
| 379444008 | sbzsz | F | June 19, 2026, 2:37 a.m. | OK | C++20 (GCC 13-64) | TESTS | 63 | 125 | 12083200 | ||
| 379409936 | dang3r | F | June 18, 2026, 4:35 p.m. | OK | C++20 (GCC 13-64) | TESTS | 63 | 125 | 18227200 | ||
| 379410482 | Hem_anth | F | June 18, 2026, 4:37 p.m. | OK | C++20 (GCC 13-64) | TESTS | 63 | 140 | 4198400 | ||
| 379412695 | mtsd | F | June 18, 2026, 4:48 p.m. | OK | C++20 (GCC 13-64) | TESTS | 63 | 140 | 4812800 | ||
| 379420803 | N_z__ | F | June 18, 2026, 5:33 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 63 | 62 | 2355200 | ||
| 379401761 | 2sqrt3 | F | June 18, 2026, 4:03 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 63 | 78 | 10137600 | ||
| 379454402 | I_Love_Charlie | F | June 19, 2026, 5:38 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 63 | 109 | 2252800 | ||
| 379419613 | JainUjjwal | F | June 18, 2026, 5:27 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 63 | 109 | 2252800 | ||
| 379407123 | ShaktiSinghUC | F | June 18, 2026, 4:23 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 63 | 109 | 2252800 | ||
| 379410982 | khanhkhanhkhanh123 | F | June 18, 2026, 4:40 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 63 | 109 | 4096000 | ||
| 379421038 | balakrishnan | F | June 18, 2026, 5:34 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 63 | 109 | 6041600 | ||
| 379441406 | Fantasy_Red | F | June 19, 2026, 1:23 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 63 | 109 | 8192000 | ||
| 379422802 | Hazemam | F | June 18, 2026, 5:56 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 63 | 109 | 8192000 | ||
| 379410862 | gunuozhang | F | June 18, 2026, 4:39 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 63 | 109 | 8396800 | ||
| 379419091 | utkarsh.dev | F | June 18, 2026, 5:24 p.m. | OK | GNU C11 | TESTS | 63 | 109 | 10137600 | ||
| 379410904 | gitgudgud | F | June 18, 2026, 4:39 p.m. | OK | Go | TESTS | 63 | 500 | 67993600 | ||
| 379415824 | nathanballman | F | June 18, 2026, 5:06 p.m. | OK | Java 21 | TESTS | 63 | 359 | 5836800 | ||
| 379417234 | ACatLastTry | F | June 18, 2026, 5:14 p.m. | OK | Java 21 | TESTS | 63 | 796 | 21811200 | ||
| 379403946 | gofrozen21 | F | June 18, 2026, 4:11 p.m. | OK | Java 21 | TESTS | 63 | 812 | 46284800 | ||
| 379414660 | pranav.devvv | F | June 18, 2026, 4:59 p.m. | OK | Java 21 | TESTS | 63 | 1078 | 16384000 | ||
| 379414858 | uber_calm_18 | F | June 18, 2026, 5 p.m. | OK | Java 21 | TESTS | 63 | 1562 | 91852800 | ||
| 379446016 | Yoda1122 | F | June 19, 2026, 3:18 a.m. | OK | Java 21 | TESTS | 63 | 1593 | 100147200 | ||
| 379409787 | sri_nandu | F | June 18, 2026, 4:34 p.m. | OK | Java 21 | TESTS | 63 | 1828 | 94310400 | ||
| 379432632 | arvindf232 | F | June 18, 2026, 8:26 p.m. | OK | Kotlin 2.2 | TESTS | 63 | 375 | 5427200 | ||
| 379409815 | bitplease_ | F | June 18, 2026, 4:34 p.m. | OK | Node.js | TESTS | 63 | 1546 | 81715200 | ||
| 379420593 | lily176743 | F | June 18, 2026, 5:32 p.m. | OK | PyPy 3-64 | TESTS | 63 | 234 | 44032000 | ||
| 379400537 | cfs.py | F | June 18, 2026, 3:59 p.m. | OK | PyPy 3-64 | TESTS | 63 | 250 | 60723200 | ||
| 379418573 | Hyder1102 | F | June 18, 2026, 5:21 p.m. | OK | PyPy 3-64 | TESTS | 63 | 265 | 74342400 | ||
| 379405931 | dumb_god | F | June 18, 2026, 4:18 p.m. | OK | PyPy 3-64 | TESTS | 63 | 296 | 59596800 | ||
| 379423015 | Monqieur | F | June 18, 2026, 5:58 p.m. | OK | PyPy 3-64 | TESTS | 63 | 343 | 67174400 | ||
| 379416086 | akshat-31415 | F | June 18, 2026, 5:07 p.m. | OK | PyPy 3-64 | TESTS | 63 | 390 | 51097600 | ||
| 379419130 | RutvikSai | F | June 18, 2026, 5:25 p.m. | OK | PyPy 3-64 | TESTS | 63 | 765 | 60723200 | ||
| 379407611 | liyin20200613 | F | June 18, 2026, 4:25 p.m. | OK | PyPy 3-64 | TESTS | 63 | 1296 | 65945600 | ||
| 379407947 | mikelou | F | June 18, 2026, 4:26 p.m. | OK | PyPy 3-64 | TESTS | 63 | 1468 | 67481600 | ||
| 379415048 | BennyLaw | F | June 18, 2026, 5:01 p.m. | OK | PyPy 3-64 | TESTS | 63 | 1734 | 67993600 | ||
| 379419430 | churik | F | June 18, 2026, 5:26 p.m. | OK | Python 3 | TESTS | 63 | 296 | 48537600 | ||
| 379408532 | maworkin | F | June 18, 2026, 4:29 p.m. | OK | Python 3 | TESTS | 63 | 312 | 49459200 | ||
| 379418015 | Prestige | F | June 18, 2026, 5:18 p.m. | OK | Python 3 | TESTS | 63 | 437 | 48742400 | ||
| 379403371 | Pravin-raj | F | June 18, 2026, 4:09 p.m. | OK | Python 3 | TESTS | 63 | 453 | 51507200 | ||
| 379416515 | Piyush122005 | F | June 18, 2026, 5:09 p.m. | OK | Python 3 | TESTS | 63 | 1515 | 75571200 | ||
| 379417026 | shivanshsri2003 | F | June 18, 2026, 5:12 p.m. | OK | Python 3 | TESTS | 63 | 1546 | 77926400 | ||
| 379410120 | indistylo | F | June 18, 2026, 4:36 p.m. | OK | Rust 2024 | TESTS | 63 | 171 | 14131200 | ||
| 379413595 | Egor | F | June 18, 2026, 4:53 p.m. | OK | Rust 2024 | TESTS | 63 | 281 | 15769600 | ||
| 379417939 | cvs-650 | F | June 18, 2026, 5:18 p.m. | OK | Rust 2024 | TESTS | 63 | 984 | 32153600 |
Back to search problems