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 |
---|---|---|---|---|---|---|
1849 | Educational Codeforces Round 152 (Rated for Div. 2) | FINISHED | False | 7200 | 41354699 | July 27, 2023, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 26541 ) | B | Monsters | PROGRAMMING | greedy sortings |
B"Monocarp is playing yet another computer game. And yet again, his character is killing some monsters. There are n monsters, numbered from 1 to n , and the i -th of them has a_i health points initially. Monocarp's character has an ability that deals k damage to the monster with the highest current health. If there are several of them, the one with the smaller index is chosen. If a monster's health becomes less than or equal to 0 after Monocarp uses his ability, then it dies. Monocarp uses his ability until all monsters die. Your task is to determine the order in which monsters will die. The first line contains a single integer t ( 1 <= t <= 10^4 ) -- the number of test cases. The first line of each test case contains two integers n and k ( 1 <= n <= 3 cdot 10^5 ; 1 <= k <= 10^9 ) -- the number of monsters and the damage which Monocarp's ability deals. The second line contains n integers a_1, a_2, ... , a_n ( 1 <= a_i <= 10^9 ) -- the initial health points of monsters. The sum of n over all test cases doesn't exceed 3 cdot 10^5 . For each test case, print n integers -- the indices of monsters in the order they die. In the first example, the health points change as follows: [1, 2, underline{3}] rightarrow [1, underline{2}, 1] rightarrow [ underline{1}, 0, 1] rightarrow [-1, 0, underline{1}] rightarrow [-1, 0, -1] . The monster that is going to take damage the next time Monocarp uses his ability is underlined. In the second example, the health points change as follows: [ underline{1}, 1] rightarrow [-2, underline{1}] rightarrow [-2, -2] . In the third example, the health points change as follows: [2, underline{8}, 3, 5] rightarrow [2, underline{5}, 3, 5] rightarrow [2, 2, 3, underline{5}] rightarrow [2, 2, underline{3}, 2] rightarrow [ underline{2}, 2, 0, 2] rightarrow [-1, underline{2}, 0, 2] rightarrow "... |
118752 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
216019055 | bluemegane | B | July 27, 2023, 11:07 p.m. | OK | C# 8 | TESTS | 7 | 342 | 61235200 | ||
216008016 | Zandler | B | July 27, 2023, 8:07 p.m. | OK | C# 8 | TESTS | 7 | 1637 | 50176000 | ||
215996077 | kutu | B | July 27, 2023, 6:04 p.m. | OK | Clang++17 Diagnostics | TESTS | 7 | 421 | 2764800 | ||
215991840 | DarkWillow | B | July 27, 2023, 5:32 p.m. | OK | GNU C11 | TESTS | 7 | 171 | 2355200 | ||
215992143 | DarkWillow | B | July 27, 2023, 5:34 p.m. | OK | GNU C11 | TESTS | 7 | 171 | 2457600 | ||
216043206 | wangjingxu | B | July 28, 2023, 5:12 a.m. | OK | GNU C++14 | TESTS | 7 | 139 | 2355200 | ||
216035512 | yuxn0 | B | July 28, 2023, 3:30 a.m. | OK | GNU C++14 | TESTS | 7 | 139 | 2457600 | ||
216014970 | Rawan_Almashad | B | July 27, 2023, 9:46 p.m. | OK | GNU C++14 | TESTS | 7 | 139 | 6348800 | ||
216014845 | Hager_Ashraf428 | B | July 27, 2023, 9:44 p.m. | OK | GNU C++14 | TESTS | 7 | 140 | 2457600 | ||
216024789 | xxxyyyzzz | B | July 28, 2023, 1:07 a.m. | OK | GNU C++14 | TESTS | 7 | 140 | 3584000 | ||
215985593 | curtain-cpp | B | July 27, 2023, 4:53 p.m. | OK | GNU C++14 | TESTS | 7 | 140 | 6348800 | ||
216045308 | jatinxkirito | B | July 28, 2023, 5:38 a.m. | OK | GNU C++14 | TESTS | 7 | 155 | 2355200 | ||
216010262 | myst-6 | B | July 27, 2023, 8:36 p.m. | OK | GNU C++14 | TESTS | 7 | 155 | 2457600 | ||
216038528 | GreenWhale | B | July 28, 2023, 4:09 a.m. | OK | GNU C++14 | TESTS | 7 | 155 | 2457600 | ||
216041081 | I_AK_CCF | B | July 28, 2023, 4:44 a.m. | OK | GNU C++14 | TESTS | 7 | 155 | 2457600 | ||
215989239 | rubel_ | B | July 27, 2023, 5:15 p.m. | OK | GNU C++17 | TESTS | 7 | 124 | 7680000 | ||
215987854 | Galuu | B | July 27, 2023, 5:06 p.m. | OK | GNU C++17 | TESTS | 7 | 139 | 3584000 | ||
215997785 | _Stella_ | B | July 27, 2023, 6:19 p.m. | OK | GNU C++17 | TESTS | 7 | 139 | 6348800 | ||
215991365 | trungthanh1601 | B | July 27, 2023, 5:29 p.m. | OK | GNU C++17 | TESTS | 7 | 139 | 6348800 | ||
216037244 | xbai | B | July 28, 2023, 3:53 a.m. | OK | GNU C++17 | TESTS | 7 | 139 | 6963200 | ||
216008733 | teefaaa | B | July 27, 2023, 8:16 p.m. | OK | GNU C++17 | TESTS | 7 | 139 | 7577600 | ||
216018291 | Taha | B | July 27, 2023, 10:51 p.m. | OK | GNU C++17 | TESTS | 7 | 139 | 7577600 | ||
216032285 | ChisatoNishikigi | B | July 28, 2023, 2:48 a.m. | OK | GNU C++17 | TESTS | 7 | 139 | 7577600 | ||
216019859 | Suraj_Chavan | B | July 27, 2023, 11:26 p.m. | OK | GNU C++17 | TESTS | 7 | 140 | 2457600 | ||
215999851 | Electron1997 | B | July 27, 2023, 6:37 p.m. | OK | GNU C++17 | TESTS | 7 | 140 | 2457600 | ||
215982882 | MaGnsi0 | B | July 27, 2023, 4:41 p.m. | OK | GNU C++17 (64) | TESTS | 7 | 108 | 2457600 | ||
216031657 | kuchibi | B | July 28, 2023, 2:40 a.m. | OK | GNU C++17 (64) | TESTS | 7 | 108 | 4812800 | ||
216043894 | luogu_bot5 | B | July 28, 2023, 5:20 a.m. | OK | GNU C++17 (64) | TESTS | 7 | 109 | 2457600 | ||
216031801 | vjudge2 | B | July 28, 2023, 2:42 a.m. | OK | GNU C++17 (64) | TESTS | 7 | 109 | 4812800 | ||
215983798 | Harsh1212 | B | July 27, 2023, 4:45 p.m. | OK | GNU C++17 (64) | TESTS | 7 | 109 | 13721600 | ||
216006601 | iAmShipul | B | July 27, 2023, 7:51 p.m. | OK | GNU C++17 (64) | TESTS | 7 | 109 | 18124800 | ||
216022637 | Lenvil | B | July 28, 2023, 12:31 a.m. | OK | GNU C++17 (64) | TESTS | 7 | 124 | 2355200 | ||
216032953 | tarjen | B | July 28, 2023, 2:57 a.m. | OK | GNU C++17 (64) | TESTS | 7 | 124 | 2457600 | ||
216045175 | ShirosakiMieru | B | July 28, 2023, 5:36 a.m. | OK | GNU C++17 (64) | TESTS | 7 | 124 | 2457600 | ||
216047028 | Alfa | B | July 28, 2023, 5:58 a.m. | OK | GNU C++17 (64) | TESTS | 7 | 124 | 2457600 | ||
216030818 | uuku | B | July 28, 2023, 2:30 a.m. | OK | GNU C++20 (64) | TESTS | 7 | 61 | 4505600 | ||
215983170 | dr3515 | B | July 27, 2023, 4:42 p.m. | OK | GNU C++20 (64) | TESTS | 7 | 77 | 2457600 | ||
216017414 | labibalfaisal | B | July 27, 2023, 10:33 p.m. | OK | GNU C++20 (64) | TESTS | 7 | 77 | 2457600 | ||
216046707 | mahdi.hasnat | B | July 28, 2023, 5:55 a.m. | OK | GNU C++20 (64) | TESTS | 7 | 77 | 2457600 | ||
216039082 | Remake_man | B | July 28, 2023, 4:16 a.m. | OK | GNU C++20 (64) | TESTS | 7 | 77 | 3584000 | ||
216030043 | lord_mystery | B | July 28, 2023, 2:21 a.m. | OK | GNU C++20 (64) | TESTS | 7 | 77 | 4812800 | ||
215997672 | abdallah_moemen | B | July 27, 2023, 6:18 p.m. | OK | GNU C++20 (64) | TESTS | 7 | 77 | 7372800 | ||
216030731 | sansan__ | B | July 28, 2023, 2:29 a.m. | OK | GNU C++20 (64) | TESTS | 7 | 78 | 2457600 | ||
216028157 | anfei | B | July 28, 2023, 1:55 a.m. | OK | GNU C++20 (64) | TESTS | 7 | 78 | 2457600 | ||
216026353 | TyrannosaurusRexx | B | July 28, 2023, 1:31 a.m. | OK | GNU C++20 (64) | TESTS | 7 | 78 | 2457600 | ||
215991391 | vana0kor | B | July 27, 2023, 5:29 p.m. | OK | Go | TESTS | 7 | 966 | 35532800 | ||
216026868 | karamkontar | B | July 28, 2023, 1:37 a.m. | OK | Java 11 | TESTS | 7 | 374 | 15667200 | ||
216034362 | InfinitePath | B | July 28, 2023, 3:15 a.m. | OK | Java 11 | TESTS | 7 | 405 | 65024000 | ||
216015015 | MuhammD_husss | B | July 27, 2023, 9:47 p.m. | OK | Java 11 | TESTS | 7 | 452 | 19865600 | ||
215991208 | .shinchan_ | B | July 27, 2023, 5:28 p.m. | OK | Java 11 | TESTS | 7 | 483 | 20070400 | ||
215992785 | Utkarsh99 | B | July 27, 2023, 5:38 p.m. | OK | Java 11 | TESTS | 7 | 561 | 25292800 | ||
216020111 | SmartCode | B | July 27, 2023, 11:32 p.m. | OK | Java 11 | TESTS | 7 | 1247 | 29286400 | ||
216025667 | man-ray | B | July 28, 2023, 1:21 a.m. | OK | Java 11 | TESTS | 7 | 1668 | 6860800 | ||
216044636 | archieagarwal | B | July 28, 2023, 5:29 a.m. | OK | Java 11 | TESTS | 7 | 1669 | 19456000 | ||
216008592 | jainprachi2611 | B | July 27, 2023, 8:14 p.m. | OK | Java 11 | TESTS | 7 | 1684 | 7065600 | ||
215998001 | vijaymehrotra99 | B | July 27, 2023, 6:21 p.m. | OK | Java 11 | TESTS | 7 | 1746 | 8908800 | ||
216033167 | Gladery | B | July 28, 2023, 2:59 a.m. | OK | Java 17 | TESTS | 7 | 405 | 15257600 | ||
216006179 | egor4444ik | B | July 27, 2023, 7:46 p.m. | OK | Java 17 | TESTS | 7 | 405 | 15564800 | ||
215992636 | rbaliwal00 | B | July 27, 2023, 5:37 p.m. | OK | Java 17 | TESTS | 7 | 420 | 21708800 | ||
215987340 | Suraj1607 | B | July 27, 2023, 5:03 p.m. | OK | Java 17 | TESTS | 7 | 467 | 26521600 | ||
216041091 | v7fgg | B | July 28, 2023, 4:44 a.m. | OK | Java 17 | TESTS | 7 | 483 | 15872000 | ||
215990417 | __Hamlet__ | B | July 27, 2023, 5:22 p.m. | OK | Java 17 | TESTS | 7 | 514 | 82124800 | ||
216015405 | woodyiiiiiii | B | July 27, 2023, 9:53 p.m. | OK | Java 17 | TESTS | 7 | 545 | 12697600 | ||
216006435 | GaleStarr | B | July 27, 2023, 7:49 p.m. | OK | Java 17 | TESTS | 7 | 780 | 11366400 | ||
216042585 | dco | B | July 28, 2023, 5:04 a.m. | OK | Java 17 | TESTS | 7 | 811 | 6246400 | ||
215994414 | pranay_1012 | B | July 27, 2023, 5:50 p.m. | OK | Java 17 | TESTS | 7 | 826 | 7475200 | ||
216042127 | chuquwan9964 | B | July 28, 2023, 4:58 a.m. | OK | Java 8 | TESTS | 7 | 311 | 5427200 | ||
215991811 | 3laaHisham | B | July 27, 2023, 5:32 p.m. | OK | Java 8 | TESTS | 7 | 358 | 14028800 | ||
215991955 | Harwinvanak | B | July 27, 2023, 5:33 p.m. | OK | Java 8 | TESTS | 7 | 373 | 7884800 | ||
215999843 | Juhaied_nabid | B | July 27, 2023, 6:37 p.m. | OK | Java 8 | TESTS | 7 | 701 | 8908800 | ||
215986369 | shivam01_0 | B | July 27, 2023, 4:57 p.m. | OK | Java 8 | TESTS | 7 | 717 | 5529600 | ||
215987937 | Aworlds | B | July 27, 2023, 5:06 p.m. | OK | Java 8 | TESTS | 7 | 779 | 10035200 | ||
216046214 | hzEnv | B | July 28, 2023, 5:49 a.m. | OK | Java 8 | TESTS | 7 | 1169 | 13516800 | ||
216006041 | hamossa | B | July 27, 2023, 7:44 p.m. | OK | Java 8 | TESTS | 7 | 1185 | 14540800 | ||
216046727 | hzEnv | B | July 28, 2023, 5:55 a.m. | OK | Java 8 | TESTS | 7 | 1216 | 13721600 | ||
216028981 | 2215163301 | B | July 28, 2023, 2:07 a.m. | OK | Java 8 | TESTS | 7 | 1574 | 5324800 | ||
216010816 | Tubisek | B | July 27, 2023, 8:43 p.m. | OK | MS C++ 2017 | TESTS | 7 | 483 | 2457600 | ||
216026950 | lirejie | B | July 28, 2023, 1:39 a.m. | OK | MS C++ 2017 | TESTS | 7 | 498 | 2457600 | ||
215988464 | Aneeba | B | July 27, 2023, 5:09 p.m. | OK | MS C++ 2017 | TESTS | 7 | 499 | 4198400 | ||
215983616 | Antwerp2004 | B | July 27, 2023, 4:44 p.m. | OK | MS C++ 2017 | TESTS | 7 | 514 | 4812800 | ||
215985873 | magedarafa114 | B | July 27, 2023, 4:54 p.m. | OK | MS C++ 2017 | TESTS | 7 | 514 | 8294400 | ||
215985602 | mxdwj | B | July 27, 2023, 4:53 p.m. | OK | MS C++ 2017 | TESTS | 7 | 530 | 4710400 | ||
216003921 | Mohamed_Ragab123321 | B | July 27, 2023, 7:20 p.m. | OK | MS C++ 2017 | TESTS | 7 | 530 | 11366400 | ||
215986427 | harsh_1503 | B | July 27, 2023, 4:57 p.m. | OK | MS C++ 2017 | TESTS | 7 | 592 | 8294400 | ||
216012102 | Dowtai | B | July 27, 2023, 9:01 p.m. | OK | MS C++ 2017 | TESTS | 7 | 592 | 9728000 | ||
216003890 | s_owlxx | B | July 27, 2023, 7:20 p.m. | OK | MS C++ 2017 | TESTS | 7 | 623 | 12390400 | ||
216032364 | upwarder1 | B | July 28, 2023, 2:49 a.m. | OK | PyPy 3 | TESTS | 7 | 842 | 28569600 | ||
216032875 | its_PranavK | B | July 28, 2023, 2:55 a.m. | OK | PyPy 3 | TESTS | 7 | 888 | 29388800 | ||
216033797 | ramab | B | July 28, 2023, 3:07 a.m. | OK | PyPy 3 | TESTS | 7 | 998 | 36864000 | ||
215986900 | harshraja31 | B | July 27, 2023, 4:59 p.m. | OK | PyPy 3 | TESTS | 7 | 1091 | 47513600 | ||
216033683 | ramab | B | July 28, 2023, 3:05 a.m. | OK | PyPy 3 | TESTS | 7 | 1107 | 48230400 | ||
216035244 | andy0liang | B | July 28, 2023, 3:27 a.m. | OK | PyPy 3 | TESTS | 7 | 1122 | 46796800 | ||
216013515 | WalrusRamen21 | B | July 27, 2023, 9:23 p.m. | OK | PyPy 3 | TESTS | 7 | 1325 | 50790400 | ||
216013614 | WalrusRamen21 | B | July 27, 2023, 9:25 p.m. | OK | PyPy 3 | TESTS | 7 | 1357 | 56729600 | ||
215986891 | 2momo2 | B | July 27, 2023, 4:59 p.m. | OK | PyPy 3 | TESTS | 7 | 1450 | 35328000 | ||
215983518 | jvatsal0709 | B | July 27, 2023, 4:44 p.m. | OK | PyPy 3 | TESTS | 7 | 1575 | 36147200 | ||
215995711 | FlakeLCR | B | July 27, 2023, 6:01 p.m. | OK | PyPy 3-64 | TESTS | 7 | 187 | 46182400 | ||
215995575 | gardengnome | B | July 27, 2023, 6 p.m. | OK | PyPy 3-64 | TESTS | 7 | 249 | 49971200 | ||
215996271 | FlakeLCR | B | July 27, 2023, 6:06 p.m. | OK | PyPy 3-64 | TESTS | 7 | 312 | 56832000 | ||
215994802 | bergus | B | July 27, 2023, 5:53 p.m. | OK | PyPy 3-64 | TESTS | 7 | 312 | 57139200 | ||
216001948 | Ankush_tonde | B | July 27, 2023, 6:59 p.m. | OK | PyPy 3-64 | TESTS | 7 | 405 | 56729600 | ||
215997932 | Boomyday12343 | B | July 27, 2023, 6:21 p.m. | OK | PyPy 3-64 | TESTS | 7 | 467 | 52736000 | ||
215985262 | injust | B | July 27, 2023, 4:52 p.m. | OK | PyPy 3-64 | TESTS | 7 | 545 | 55910400 | ||
215988968 | zronghui | B | July 27, 2023, 5:13 p.m. | OK | PyPy 3-64 | TESTS | 7 | 561 | 61644800 | ||
215985801 | hossam_dif | B | July 27, 2023, 4:54 p.m. | OK | PyPy 3-64 | TESTS | 7 | 608 | 51507200 | ||
215984849 | injust | B | July 27, 2023, 4:49 p.m. | OK | PyPy 3-64 | TESTS | 7 | 608 | 51507200 | ||
216004234 | solitaryReaper | B | July 27, 2023, 7:24 p.m. | OK | Python 3 | TESTS | 7 | 577 | 44032000 | ||
216031462 | abhijit07cf | B | July 28, 2023, 2:38 a.m. | OK | Python 3 | TESTS | 7 | 732 | 47001600 | ||
215991099 | Saikiran3585 | B | July 27, 2023, 5:27 p.m. | OK | Python 3 | TESTS | 7 | 748 | 72601600 | ||
216032868 | NoLongerHuman | B | July 28, 2023, 2:55 a.m. | OK | Python 3 | TESTS | 7 | 763 | 57036800 | ||
215987122 | raiden02 | B | July 27, 2023, 5:02 p.m. | OK | Python 3 | TESTS | 7 | 779 | 58880000 | ||
215991563 | Block_Cipher | B | July 27, 2023, 5:30 p.m. | OK | Python 3 | TESTS | 7 | 779 | 60723200 | ||
215985958 | powershop9640 | B | July 27, 2023, 4:55 p.m. | OK | Python 3 | TESTS | 7 | 779 | 71065600 | ||
215992096 | Yorik123 | B | July 27, 2023, 5:34 p.m. | OK | Python 3 | TESTS | 7 | 810 | 70758400 | ||
215987560 | pennymagic156 | B | July 27, 2023, 5:04 p.m. | OK | Python 3 | TESTS | 7 | 810 | 71884800 | ||
216041628 | xfppm47 | B | July 28, 2023, 4:51 a.m. | OK | Python 3 | TESTS | 7 | 811 | 39628800 | ||
216018461 | 0x81 | B | July 27, 2023, 10:55 p.m. | OK | Ruby 3 | TESTS | 7 | 1154 | 29798400 | ||
216025009 | khollbach | B | July 28, 2023, 1:11 a.m. | OK | Rust 2021 | TESTS | 7 | 155 | 10956800 | ||
216013895 | ihnaqi | B | July 27, 2023, 9:29 p.m. | OK | Rust 2021 | TESTS | 7 | 155 | 25292800 |
Back to search problems