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 |
|---|---|---|---|---|---|---|
| 2236 | Codeforces Round 1103 (Div. 3) | FINISHED | False | 9000 | 6189914 | June 12, 2026, 2:35 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 12958 ) | D | Brand New Tatar TV Show | PROGRAMMING | binary search constructive algorithms dp games math |
Dabir and Egor were not satisfied with the fame from the previous episode, so they decided to make another TV show: the guys play their favorite game on an array (a) with their favorite integer (k). Dabir moves first. On the first move, any element from the array can be chosen and removed. Let the previous chosen element be equal to (x). Then on the current move, except the very first one, a player must choose an element (y) from the array such that (0 \leq y - x \leq k) and remove it from the array. The player who cannot make a move loses. But since this was not just a game, but a real show-match, Arseniy (aka MAKAN) — the main celebrity of Omsk was invited again. As a guest celebrity, Arseniy was given the opportunity to make the first move in this match, that is, to make the very first move in the game instead of Dabir . However, it turns out Arseniy is a fan of Egor, so he wants his first move to guarantee Egor a winning strategy against any response from Dabir. Determine whether Arseniy can make the first move for Dabir so that, no matter how Dabir plays, Egor wins. Each test consists of multiple test cases. The first line contains a single integer (t) ((1 \leq t \leq 10^4)) — the number of test cases. The first line of each test case contains two integers (n) and (k) ((1 \leq n, k \leq 2 \cdot 10^5)) — the length of the array and the favorite integer of Dabir and Egor. The second line contains (n) integers (a_1, a_2, \ldots, a_n) ((1 \leq a_i \leq n)). It is guaranteed that the sum of (n) over all test cases does not exceed (2 \cdot 10^5). For each test case, if there exists such a first move that with optimal play by both players Egor wins, output " YES ", otherwise output " NO ". You can output " YES " and " NO " in any case (for example, " yES ", " yes ", and " Yes " will be accepted). In the first example, the only possible option is to choose the integer (3). After that, the array [ |
| 154496 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 378451515 | 2007_brat | D | June 12, 2026, 8:08 p.m. | OK | C++17 (GCC 7-32) | TESTS | 20 | 62 | 0 | ||
| 378457042 | ana.pacheco.loayzza | D | June 12, 2026, 10:44 p.m. | OK | C++17 (GCC 7-32) | TESTS | 20 | 62 | 0 | ||
| 378573052 | magnom | D | June 14, 2026, 5:24 a.m. | OK | C++17 (GCC 7-32) | TESTS | 21 | 78 | 0 | ||
| 378571453 | amuerri | D | June 14, 2026, 4:57 a.m. | OK | C++17 (GCC 7-32) | TESTS | 21 | 78 | 0 | ||
| 378566454 | yingjunhao | D | June 14, 2026, 3:04 a.m. | OK | C++17 (GCC 7-32) | TESTS | 21 | 78 | 0 | ||
| 378529950 | practise9026 | D | June 13, 2026, 3:27 p.m. | OK | C++17 (GCC 7-32) | TESTS | 21 | 78 | 0 | ||
| 378562291 | ViniDaemon | D | June 14, 2026, 12:47 a.m. | OK | C++17 (GCC 7-32) | TESTS | 21 | 78 | 0 | ||
| 378555847 | srjn99 | D | June 13, 2026, 8:28 p.m. | OK | C++17 (GCC 7-32) | TESTS | 21 | 78 | 0 | ||
| 378552922 | Basil815 | D | June 13, 2026, 7:35 p.m. | OK | C++17 (GCC 7-32) | TESTS | 21 | 78 | 0 | ||
| 378574826 | dimethylglyoxime | D | June 14, 2026, 5:50 a.m. | OK | C++17 (GCC 7-32) | TESTS | 21 | 78 | 0 | ||
| 378533796 | crazyPheonix | D | June 13, 2026, 4:04 p.m. | OK | C++20 (GCC 13-64) | TESTS | 21 | 62 | 0 | ||
| 378561292 | Handsome_Donkey | D | June 13, 2026, 11:49 p.m. | OK | C++20 (GCC 13-64) | TESTS | 21 | 62 | 0 | ||
| 378559716 | kovalkek | D | June 13, 2026, 10:24 p.m. | OK | C++20 (GCC 13-64) | TESTS | 21 | 62 | 0 | ||
| 378557408 | algaib | D | June 13, 2026, 9:05 p.m. | OK | C++20 (GCC 13-64) | TESTS | 21 | 62 | 0 | ||
| 378552399 | AmeerTamimi | D | June 13, 2026, 7:26 p.m. | OK | C++20 (GCC 13-64) | TESTS | 21 | 62 | 0 | ||
| 378549098 | Yassia | D | June 13, 2026, 6:37 p.m. | OK | C++20 (GCC 13-64) | TESTS | 21 | 62 | 0 | ||
| 378516307 | hnuahe_Hhh | D | June 13, 2026, 1:10 p.m. | OK | C++20 (GCC 13-64) | TESTS | 20 | 62 | 0 | ||
| 378470319 | baodinh11 | D | June 13, 2026, 4:56 a.m. | OK | C++20 (GCC 13-64) | TESTS | 20 | 62 | 0 | ||
| 378461812 | aadityarajput636 | D | June 13, 2026, 2:01 a.m. | OK | C++20 (GCC 13-64) | TESTS | 20 | 62 | 0 | ||
| 378460571 | Soria | D | June 13, 2026, 1:21 a.m. | OK | C++20 (GCC 13-64) | TESTS | 20 | 62 | 0 | ||
| 378527879 | __yun__ | D | June 13, 2026, 3:06 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 21 | 46 | 3686400 | ||
| 378571239 | xor_abhinav | D | June 14, 2026, 4:53 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 21 | 62 | 0 | ||
| 378571063 | Njasoo | D | June 14, 2026, 4:50 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 21 | 62 | 0 | ||
| 378570148 | Ladamalina | D | June 14, 2026, 4:30 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 21 | 62 | 0 | ||
| 378566205 | liguanli | D | June 14, 2026, 2:58 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 21 | 62 | 0 | ||
| 378561835 | Ivang | D | June 14, 2026, 12:24 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 21 | 62 | 0 | ||
| 378552901 | erwinsmith_016 | D | June 13, 2026, 7:34 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 21 | 62 | 0 | ||
| 378545324 | Fajrin_Thuja | D | June 13, 2026, 5:59 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 21 | 62 | 0 | ||
| 378541358 | HeadAche__ | D | June 13, 2026, 5:19 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 21 | 62 | 0 | ||
| 378534750 | Kabi_R_Joshi | D | June 13, 2026, 4:13 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 21 | 62 | 0 | ||
| 378471817 | Ghost_tf141 | D | June 13, 2026, 5:19 a.m. | OK | GNU C11 | TESTS | 20 | 62 | 1638400 | ||
| 378456244 | fishy15 | D | June 12, 2026, 10:13 p.m. | OK | Haskell | TESTS | 20 | 562 | 67174400 | ||
| 378502815 | yogesh- | D | June 13, 2026, 11 a.m. | OK | Java 21 | TESTS | 20 | 187 | 1331200 | ||
| 378545585 | warks | D | June 13, 2026, 6:02 p.m. | OK | Java 21 | TESTS | 21 | 203 | 4812800 | ||
| 378497567 | Siddeshwer_Reddy | D | June 13, 2026, 10:09 a.m. | OK | Java 21 | TESTS | 20 | 234 | 10854400 | ||
| 378533980 | BitHunter_65_ | D | June 13, 2026, 4:06 p.m. | OK | Java 21 | TESTS | 21 | 250 | 17510400 | ||
| 378490981 | sriram_18 | D | June 13, 2026, 9:09 a.m. | OK | Java 21 | TESTS | 20 | 265 | 921600 | ||
| 378495889 | harshzpatel | D | June 13, 2026, 9:53 a.m. | OK | Java 21 | TESTS | 20 | 265 | 921600 | ||
| 378501429 | Cranky101 | D | June 13, 2026, 10:46 a.m. | OK | Java 21 | TESTS | 20 | 265 | 2150400 | ||
| 378554184 | annon__cc | D | June 13, 2026, 7:56 p.m. | OK | Java 21 | TESTS | 21 | 265 | 7475200 | ||
| 378510799 | kartik__sethi | D | June 13, 2026, 12:15 p.m. | OK | Java 21 | TESTS | 20 | 281 | 6144000 | ||
| 378461688 | TRC_19 | D | June 13, 2026, 1:58 a.m. | OK | Java 21 | TESTS | 20 | 281 | 7270400 | ||
| 378473253 | ashi.jain.1411 | D | June 13, 2026, 5:37 a.m. | OK | Java 8 | TESTS | 20 | 453 | 13004800 | ||
| 378547596 | nareshveerapuram07 | D | June 13, 2026, 6:21 p.m. | OK | Java 8 | TESTS | 21 | 593 | 5017600 | ||
| 378489238 | manavajk26 | D | June 13, 2026, 8:53 a.m. | OK | Java 8 | TESTS | 20 | 593 | 6144000 | ||
| 378547763 | AbdelRahmanEmara | D | June 13, 2026, 6:23 p.m. | OK | Java 8 | TESTS | 21 | 765 | 5017600 | ||
| 378496947 | godofwar_1007 | D | June 13, 2026, 10:03 a.m. | OK | PyPy 3 | TESTS | 20 | 218 | 16793600 | ||
| 378475613 | -nameless- | D | June 13, 2026, 6:05 a.m. | OK | PyPy 3 | TESTS | 20 | 218 | 20787200 | ||
| 378457868 | what_lover | D | June 12, 2026, 11:23 p.m. | OK | PyPy 3 | TESTS | 20 | 281 | 16179200 | ||
| 378518393 | ps2006 | D | June 13, 2026, 1:33 p.m. | OK | PyPy 3 | TESTS | 20 | 390 | 15872000 | ||
| 378487994 | PhoenixLegacy | D | June 13, 2026, 8:42 a.m. | OK | PyPy 3-64 | TESTS | 20 | 93 | 16998400 | ||
| 378552940 | hrishabhnayal | D | June 13, 2026, 7:35 p.m. | OK | PyPy 3-64 | TESTS | 21 | 93 | 20889600 | ||
| 378502729 | dulat_akbulatov | D | June 13, 2026, 10:59 a.m. | OK | PyPy 3-64 | TESTS | 20 | 109 | 19968000 | ||
| 378548904 | hmsvrtnEOE_ | D | June 13, 2026, 6:35 p.m. | OK | PyPy 3-64 | TESTS | 21 | 109 | 23347200 | ||
| 378496965 | anirudhm82 | D | June 13, 2026, 10:03 a.m. | OK | PyPy 3-64 | TESTS | 20 | 109 | 25600000 | ||
| 378520463 | shreshthadlakha | D | June 13, 2026, 1:54 p.m. | OK | PyPy 3-64 | TESTS | 20 | 125 | 21606400 | ||
| 378515579 | UB04 | D | June 13, 2026, 1:02 p.m. | OK | PyPy 3-64 | TESTS | 20 | 125 | 22118400 | ||
| 378511881 | OAY71011 | D | June 13, 2026, 12:25 p.m. | OK | PyPy 3-64 | TESTS | 20 | 125 | 23961600 | ||
| 378488341 | yhiwbagah | D | June 13, 2026, 8:45 a.m. | OK | PyPy 3-64 | TESTS | 20 | 125 | 24780800 | ||
| 378497073 | anirudhm82 | D | June 13, 2026, 10:04 a.m. | OK | PyPy 3-64 | TESTS | 20 | 125 | 26521600 | ||
| 378552893 | vharshith216 | D | June 13, 2026, 7:34 p.m. | OK | Python 3 | TESTS | 21 | 125 | 14950400 | ||
| 378568441 | gooonn | D | June 14, 2026, 3:51 a.m. | OK | Python 3 | TESTS | 21 | 125 | 23347200 | ||
| 378499536 | ArnavJareda | D | June 13, 2026, 10:27 a.m. | OK | Python 3 | TESTS | 20 | 125 | 23449600 | ||
| 378501944 | kl2400080094 | D | June 13, 2026, 10:51 a.m. | OK | Python 3 | TESTS | 20 | 140 | 14848000 | ||
| 378565351 | Jin_Kazama_jalaun | D | June 14, 2026, 2:34 a.m. | OK | Python 3 | TESTS | 21 | 140 | 23756800 | ||
| 378516085 | know_pain | D | June 13, 2026, 1:08 p.m. | OK | Python 3 | TESTS | 20 | 140 | 26419200 | ||
| 378519989 | anushkaxag | D | June 13, 2026, 1:49 p.m. | OK | Python 3 | TESTS | 20 | 171 | 23347200 | ||
| 378537319 | adarshd28 | D | June 13, 2026, 4:39 p.m. | OK | Python 3 | TESTS | 21 | 187 | 23244800 | ||
| 378449932 | _Shivansh_Anu | D | June 12, 2026, 7:39 p.m. | OK | Python 3 | TESTS | 20 | 296 | 24883200 | ||
| 378495424 | jvatsal0709 | D | June 13, 2026, 9:49 a.m. | OK | Python 3 | TESTS | 20 | 343 | 32051200 | ||
| 378508577 | z0ne | D | June 13, 2026, 11:53 a.m. | OK | Rust 2024 | TESTS | 20 | 46 | 1433600 | ||
| 378522403 | GlowCheese | D | June 13, 2026, 2:14 p.m. | OK | Rust 2024 | TESTS | 20 | 46 | 2355200 |
Back to search problems