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 |
---|---|---|---|---|---|---|
1592 | Codeforces Round 746 (Div. 2) | FINISHED | False | 7200 | 103994663 | Oct. 3, 2021, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 16247 ) | B | Hemose Shopping | PROGRAMMING | ds math sortings |
B'Hemose was shopping with his friends Samez, AhmedZ, AshrafEzz, TheSawan and O_E in Germany. As you know, Hemose and his friends are problem solvers, so they are very clever. Therefore, they will go to all discount markets in Germany. Hemose has an array of n integers. He wants Samez to sort the array in the non-decreasing order. Since it would be a too easy problem for Samez, Hemose allows Samez to use only the following operation: Choose indices i and j such that 1 <= i, j <= n , and lvert i - j rvert geq x . Then, swap elements a_i and a_j . Can you tell Samez if there 's a way to sort the array in the non-decreasing order by using the operation written above some finite number of times (possibly 0 )? Each test contains multiple test cases. The first line contains the number of test cases t (1 <= q t <= q 10^5) . Description of the test cases follows. The first line of each test case contains two integers n and x (1 <= q x <= q n <= q 10^5) . The second line of each test case contains n integers a_1, a_2, ..., a_n (1 <= q a_i <= q 10^9) . It is guaranteed that the sum of n over all test cases doesn 't exceed 2 cdot 10^5 . For each test case, you should output a single string. If Samez can sort the array in non-decreasing order using the operation written above, output "YES" (without quotes). Otherwise, output "NO" (without quotes). You can print each letter of "YES" and "NO" in any case (upper or lower). In the first test case, you can 't do any operations. In the second test case, the array is already sorted. In the third test case, you can do the operations as follows: (Here swap(a_i, a_j) refers to swapping elements at positions i , j ). '... |
95583 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
130717473 | 1435730 | B | Oct. 3, 2021, 4:21 p.m. | OK | GNU C11 | TESTS | 12 | 62 | 4505600 | ||
130757681 | milan_s1 | B | Oct. 4, 2021, 4:45 a.m. | OK | GNU C11 | TESTS | 12 | 93 | 3686400 | ||
130757070 | Youarenotgood | B | Oct. 4, 2021, 4:35 a.m. | OK | GNU C11 | TESTS | 12 | 109 | 4505600 | ||
130745608 | a999999 | B | Oct. 4, 2021, 12:12 a.m. | OK | GNU C++14 | TESTS | 12 | 30 | 12902400 | ||
130755101 | sparx | B | Oct. 4, 2021, 4:01 a.m. | OK | GNU C++14 | TESTS | 12 | 46 | 3891200 | ||
130731979 | infinitus11 | B | Oct. 3, 2021, 6:28 p.m. | OK | GNU C++14 | TESTS | 12 | 46 | 3993600 | ||
130721611 | dishkum | B | Oct. 3, 2021, 4:32 p.m. | OK | GNU C++14 | TESTS | 12 | 46 | 4096000 | ||
130729543 | Bnahmad15 | B | Oct. 3, 2021, 5:58 p.m. | OK | GNU C++14 | TESTS | 12 | 46 | 4505600 | ||
130729631 | xiaoziyao | B | Oct. 3, 2021, 5:59 p.m. | OK | GNU C++14 | TESTS | 12 | 46 | 4505600 | ||
130743356 | v0rtex | B | Oct. 3, 2021, 10:33 p.m. | OK | GNU C++14 | TESTS | 12 | 46 | 4608000 | ||
130748922 | Xu_Ke | B | Oct. 4, 2021, 2:07 a.m. | OK | GNU C++14 | TESTS | 12 | 46 | 5324800 | ||
130750474 | atharvabhanage1 | B | Oct. 4, 2021, 2:35 a.m. | OK | GNU C++14 | TESTS | 12 | 61 | 1638400 | ||
130758638 | simba919 | B | Oct. 4, 2021, 5 a.m. | OK | GNU C++14 | TESTS | 12 | 61 | 4096000 | ||
130753530 | bluesky111 | B | Oct. 4, 2021, 3:32 a.m. | OK | GNU C++17 | TESTS | 12 | 31 | 5427200 | ||
130724966 | Ayush__AT | B | Oct. 3, 2021, 5:11 p.m. | OK | GNU C++17 | TESTS | 12 | 31 | 8396800 | ||
130753161 | potatomonkey | B | Oct. 4, 2021, 3:25 a.m. | OK | GNU C++17 | TESTS | 12 | 46 | 1228800 | ||
130714940 | Harshit_Maheshwari | B | Oct. 3, 2021, 4:14 p.m. | OK | GNU C++17 | TESTS | 12 | 46 | 3891200 | ||
130739998 | mohamed_moumou | B | Oct. 3, 2021, 8:52 p.m. | OK | GNU C++17 | TESTS | 12 | 46 | 3891200 | ||
130737535 | Zhora_.004 | B | Oct. 3, 2021, 8 p.m. | OK | GNU C++17 | TESTS | 12 | 46 | 4096000 | ||
130714670 | WWW.H | B | Oct. 3, 2021, 4:13 p.m. | OK | GNU C++17 | TESTS | 12 | 46 | 4505600 | ||
130727474 | Jim_Steve | B | Oct. 3, 2021, 5:37 p.m. | OK | GNU C++17 | TESTS | 12 | 46 | 4505600 | ||
130720015 | Ranger_qwq | B | Oct. 3, 2021, 4:28 p.m. | OK | GNU C++17 | TESTS | 12 | 46 | 4505600 | ||
130715241 | Lcyanstars | B | Oct. 3, 2021, 4:15 p.m. | OK | GNU C++17 | TESTS | 12 | 46 | 4915200 | ||
130735475 | definitelynotmee | B | Oct. 3, 2021, 7:22 p.m. | OK | GNU C++17 (64) | TESTS | 12 | 31 | 4608000 | ||
130734363 | AshrafYousry | B | Oct. 3, 2021, 7:04 p.m. | OK | GNU C++17 (64) | TESTS | 12 | 31 | 5120000 | ||
130719500 | shinigami11 | B | Oct. 3, 2021, 4:27 p.m. | OK | GNU C++17 (64) | TESTS | 12 | 31 | 5939200 | ||
130756853 | tm_professor20 | B | Oct. 4, 2021, 4:31 a.m. | OK | GNU C++17 (64) | TESTS | 12 | 46 | 1638400 | ||
130739571 | Akib_12 | B | Oct. 3, 2021, 8:41 p.m. | OK | GNU C++17 (64) | TESTS | 12 | 46 | 4300800 | ||
130724232 | GreyHatRR17 | B | Oct. 3, 2021, 5:07 p.m. | OK | GNU C++17 (64) | TESTS | 12 | 46 | 4403200 | ||
130724085 | mukim | B | Oct. 3, 2021, 5:07 p.m. | OK | GNU C++17 (64) | TESTS | 12 | 46 | 4403200 | ||
130730240 | googlepixel4a | B | Oct. 3, 2021, 6:06 p.m. | OK | GNU C++17 (64) | TESTS | 12 | 46 | 4403200 | ||
130746578 | moo. | B | Oct. 4, 2021, 12:49 a.m. | OK | GNU C++17 (64) | TESTS | 12 | 46 | 4403200 | ||
130727067 | tox1c_kid | B | Oct. 3, 2021, 5:33 p.m. | OK | GNU C++17 (64) | TESTS | 12 | 46 | 4403200 | ||
130730758 | ARoadNotTaken | B | Oct. 3, 2021, 6:12 p.m. | OK | Go | TESTS | 12 | 187 | 15155200 | ||
130754838 | nitin23329 | B | Oct. 4, 2021, 3:56 a.m. | OK | Java 11 | TESTS | 12 | 186 | 23961600 | ||
130735253 | solo07 | B | Oct. 3, 2021, 7:19 p.m. | OK | Java 11 | TESTS | 12 | 202 | 23859200 | ||
130758699 | insane_banda | B | Oct. 4, 2021, 5:01 a.m. | OK | Java 11 | TESTS | 12 | 217 | 24780800 | ||
130719074 | gourav02 | B | Oct. 3, 2021, 4:26 p.m. | OK | Java 11 | TESTS | 12 | 218 | 24268800 | ||
130759993 | sumitchavan | B | Oct. 4, 2021, 5:22 a.m. | OK | Java 11 | TESTS | 12 | 218 | 24883200 | ||
130727213 | iamsoumik | B | Oct. 3, 2021, 5:34 p.m. | OK | Java 11 | TESTS | 12 | 233 | 24780800 | ||
130733454 | jod_07 | B | Oct. 3, 2021, 6:49 p.m. | OK | Java 11 | TESTS | 12 | 233 | 24883200 | ||
130728852 | MrOtter | B | Oct. 3, 2021, 5:50 p.m. | OK | Java 11 | TESTS | 12 | 249 | 24780800 | ||
130724101 | Avatar | B | Oct. 3, 2021, 5:07 p.m. | OK | Java 11 | TESTS | 12 | 249 | 24883200 | ||
130716845 | ryanranaut | B | Oct. 3, 2021, 4:19 p.m. | OK | Java 11 | TESTS | 12 | 249 | 24985600 | ||
130758518 | SanskarxRawat | B | Oct. 4, 2021, 4:58 a.m. | OK | Java 8 | TESTS | 12 | 109 | 21913600 | ||
130726875 | athu18 | B | Oct. 3, 2021, 5:31 p.m. | OK | Java 8 | TESTS | 12 | 140 | 20787200 | ||
130730419 | Adi_7861 | B | Oct. 3, 2021, 6:08 p.m. | OK | Java 8 | TESTS | 12 | 155 | 20684800 | ||
130730367 | Adi_7861 | B | Oct. 3, 2021, 6:08 p.m. | OK | Java 8 | TESTS | 12 | 155 | 20684800 | ||
130729800 | Restricted | B | Oct. 3, 2021, 6:01 p.m. | OK | Java 8 | TESTS | 12 | 155 | 20787200 | ||
130727566 | athu18 | B | Oct. 3, 2021, 5:38 p.m. | OK | Java 8 | TESTS | 12 | 155 | 20787200 | ||
130726463 | abdelrahmanfekri | B | Oct. 3, 2021, 5:28 p.m. | OK | Java 8 | TESTS | 12 | 155 | 20787200 | ||
130734943 | PRIYANSH_TOMAR | B | Oct. 3, 2021, 7:14 p.m. | OK | Java 8 | TESTS | 12 | 155 | 20889600 | ||
130726743 | pgthebigshot | B | Oct. 3, 2021, 5:30 p.m. | OK | Java 8 | TESTS | 12 | 155 | 21504000 | ||
130727745 | athu18 | B | Oct. 3, 2021, 5:39 p.m. | OK | Java 8 | TESTS | 12 | 170 | 20787200 | ||
130719400 | koper | B | Oct. 3, 2021, 4:27 p.m. | OK | Kotlin 1.4 | TESTS | 12 | 296 | 28979200 | ||
130731441 | avtoruxadze | B | Oct. 3, 2021, 6:22 p.m. | OK | Mono C# | TESTS | 12 | 171 | 40755200 | ||
130743696 | mishgan | B | Oct. 3, 2021, 10:45 p.m. | OK | Mono C# | TESTS | 12 | 233 | 37478400 | ||
130744022 | mishgan | B | Oct. 3, 2021, 10:59 p.m. | OK | Mono C# | TESTS | 12 | 264 | 37478400 | ||
130749630 | hxznh | B | Oct. 4, 2021, 2:20 a.m. | OK | MS C++ 2017 | TESTS | 12 | 78 | 819200 | ||
130749586 | hxznh | B | Oct. 4, 2021, 2:19 a.m. | OK | MS C++ 2017 | TESTS | 12 | 78 | 4505600 | ||
130756020 | wangzhuoyue | B | Oct. 4, 2021, 4:18 a.m. | OK | MS C++ 2017 | TESTS | 12 | 93 | 5427200 | ||
130746434 | taotaotao123 | B | Oct. 4, 2021, 12:43 a.m. | OK | MS C++ 2017 | TESTS | 12 | 93 | 30617600 | ||
130718470 | ZTFeng | B | Oct. 3, 2021, 4:24 p.m. | OK | MS C++ 2017 | TESTS | 12 | 186 | 5324800 | ||
130751209 | Tagaki | B | Oct. 4, 2021, 2:49 a.m. | OK | MS C++ 2017 | TESTS | 12 | 187 | 4505600 | ||
130749945 | tzh123 | B | Oct. 4, 2021, 2:26 a.m. | OK | MS C++ 2017 | TESTS | 12 | 187 | 5324800 | ||
130715827 | Rivennnnnnnnn | B | Oct. 3, 2021, 4:16 p.m. | OK | MS C++ 2017 | TESTS | 12 | 202 | 4608000 | ||
130727990 | Tangerine | B | Oct. 3, 2021, 5:42 p.m. | OK | MS C++ 2017 | TESTS | 12 | 202 | 5324800 | ||
130714456 | Death_Lord | B | Oct. 3, 2021, 4:12 p.m. | OK | MS C++ 2017 | TESTS | 12 | 202 | 6144000 | ||
130734667 | ShashankZobb | B | Oct. 3, 2021, 7:09 p.m. | OK | PyPy 2 | TESTS | 12 | 155 | 37171200 | ||
130741688 | acorn11 | B | Oct. 3, 2021, 9:37 p.m. | OK | PyPy 2 | TESTS | 12 | 390 | 32870400 | ||
130724937 | VN.Kiet | B | Oct. 3, 2021, 5:11 p.m. | OK | PyPy 3 | TESTS | 12 | 186 | 28057600 | ||
130731472 | IceFire | B | Oct. 3, 2021, 6:22 p.m. | OK | PyPy 3 | TESTS | 12 | 265 | 31232000 | ||
130725034 | sPARTY | B | Oct. 3, 2021, 5:12 p.m. | OK | PyPy 3 | TESTS | 12 | 265 | 38912000 | ||
130755216 | piSquared | B | Oct. 4, 2021, 4:03 a.m. | OK | PyPy 3 | TESTS | 12 | 280 | 29900800 | ||
130757594 | Up_there | B | Oct. 4, 2021, 4:44 a.m. | OK | PyPy 3 | TESTS | 12 | 280 | 34508800 | ||
130717765 | RANK1ZEN | B | Oct. 3, 2021, 4:22 p.m. | OK | PyPy 3 | TESTS | 12 | 295 | 32358400 | ||
130724892 | akshitm16 | B | Oct. 3, 2021, 5:11 p.m. | OK | PyPy 3 | TESTS | 12 | 296 | 29696000 | ||
130758847 | ghoshashis545 | B | Oct. 4, 2021, 5:04 a.m. | OK | PyPy 3 | TESTS | 12 | 311 | 30105600 | ||
130736364 | Munchy_1 | B | Oct. 3, 2021, 7:38 p.m. | OK | PyPy 3 | TESTS | 12 | 311 | 32358400 | ||
130757030 | shubh67678 | B | Oct. 4, 2021, 4:34 a.m. | OK | PyPy 3 | TESTS | 12 | 374 | 40960000 | ||
130730157 | Viper35 | B | Oct. 3, 2021, 6:05 p.m. | OK | Python 3 | TESTS | 12 | 186 | 18227200 | ||
130755198 | piSquared | B | Oct. 4, 2021, 4:02 a.m. | OK | Python 3 | TESTS | 12 | 202 | 17305600 | ||
130716264 | smf | B | Oct. 3, 2021, 4:18 p.m. | OK | Python 3 | TESTS | 12 | 218 | 9625600 | ||
130722333 | Apu123 | B | Oct. 3, 2021, 4:34 p.m. | OK | Python 3 | TESTS | 12 | 218 | 11468800 | ||
130717337 | hk1 | B | Oct. 3, 2021, 4:21 p.m. | OK | Python 3 | TESTS | 12 | 218 | 17408000 | ||
130716742 | yaashh | B | Oct. 3, 2021, 4:19 p.m. | OK | Python 3 | TESTS | 12 | 233 | 9420800 | ||
130760093 | bhavyacontractor | B | Oct. 4, 2021, 5:24 a.m. | OK | Python 3 | TESTS | 12 | 233 | 10342400 | ||
130732996 | syntaxsugar | B | Oct. 3, 2021, 6:43 p.m. | OK | Python 3 | TESTS | 12 | 233 | 16281600 | ||
130714853 | Sam._.072 | B | Oct. 3, 2021, 4:13 p.m. | OK | Python 3 | TESTS | 12 | 233 | 17203200 | ||
130715541 | Ayushrusiya47 | B | Oct. 3, 2021, 4:15 p.m. | OK | Python 3 | TESTS | 12 | 233 | 17612800 | ||
130739517 | noogler | B | Oct. 3, 2021, 8:40 p.m. | OK | Rust | TESTS | 12 | 61 | 10137600 | ||
130727765 | Ragib_Hasin | B | Oct. 3, 2021, 5:40 p.m. | OK | Rust | TESTS | 12 | 170 | 4608000 | ||
130733965 | IvanDyachenko | B | Oct. 3, 2021, 6:57 p.m. | OK | Scala | TESTS | 12 | 623 | 43212800 |
Back to search problems