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 |
---|---|---|---|---|---|---|
1557 | Codeforces Round 737 (Div. 2) | FINISHED | False | 7200 | 103303499 | Aug. 9, 2021, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 23532 ) | B | Moamen and k-subarrays | PROGRAMMING | greedy sortings |
B'Moamen has an array of n distinct integers. He wants to sort that array in non-decreasing order by doing the following operations in order exactly once: A sequence a is a subarray of a sequence b if a can be obtained from b by deletion of several (possibly, zero or all) elements from the beginning and several (possibly, zero or all) elements from the end. Can you tell Moamen if there is a way to sort the array in non-decreasing order using the operations written above? The first line contains a single integer t ( 1 <= t <= 10^3 ) -- the number of test cases. The description of the test cases follows. The first line of each test case contains two integers n and k ( 1 <= k <= n <= 10^5 ). The second line contains n integers a_1, a_2, ldots, a_n ( 0 <= |a_i| <= 10^9 ). It is guaranteed that all numbers are distinct. It is guaranteed that the sum of n over all test cases does not exceed 3 cdot10^5 . For each test case, you should output a single string. If Moamen can sort the array in non-decreasing order, 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, a = [6, 3, 4, 2, 1] , and k = 4 , so we can do the operations as follows: In the second test case, there is no way to sort the array by splitting it into only 2 subarrays. As an example, if we split it into { [1, -4], [0, -2] } , we can reorder them into { [1, -4], [0, -2] } or { [0, -2], [1, -4] } . However, after merging the subarrays, it is impossible to get a sorted array. '... |
Codeforces Round #737 Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
125417473 | gxlois | B | Aug. 9, 2021, 7:35 p.m. | OK | D | TESTS | 12 | 187 | 28979200 | ||
125429744 | -M3rcury- | B | Aug. 10, 2021, 1:15 a.m. | OK | GNU C++11 | TESTS | 12 | 31 | 4710400 | ||
125438354 | w2321 | B | Aug. 10, 2021, 3:49 a.m. | OK | GNU C++11 | TESTS | 12 | 46 | 4505600 | ||
125427455 | bottle__ | B | Aug. 10, 2021, 12:15 a.m. | OK | GNU C++11 | TESTS | 12 | 46 | 4505600 | ||
125441345 | huayouhan | B | Aug. 10, 2021, 4:38 a.m. | OK | GNU C++11 | TESTS | 12 | 46 | 4710400 | ||
125440476 | pufanyi | B | Aug. 10, 2021, 4:24 a.m. | OK | GNU C++11 | TESTS | 12 | 46 | 4710400 | ||
125432277 | Eason_AC | B | Aug. 10, 2021, 2:08 a.m. | OK | GNU C++11 | TESTS | 12 | 46 | 4710400 | ||
125429794 | -M3rcury- | B | Aug. 10, 2021, 1:16 a.m. | OK | GNU C++11 | TESTS | 12 | 46 | 4710400 | ||
125426607 | locsey | B | Aug. 9, 2021, 11:45 p.m. | OK | GNU C++11 | TESTS | 12 | 46 | 5120000 | ||
125440980 | LinkZelda | B | Aug. 10, 2021, 4:32 a.m. | OK | GNU C++11 | TESTS | 12 | 46 | 5324800 | ||
125440954 | LinkZelda | B | Aug. 10, 2021, 4:32 a.m. | OK | GNU C++11 | TESTS | 12 | 46 | 5324800 | ||
125444042 | samratdewdrops0 | B | Aug. 10, 2021, 5:20 a.m. | OK | GNU C++14 | TESTS | 12 | 93 | 4505600 | ||
125442197 | SoumyadeepRoy29 | B | Aug. 10, 2021, 4:52 a.m. | OK | GNU C++14 | TESTS | 12 | 93 | 4505600 | ||
125436253 | Ronakkhandlwl | B | Aug. 10, 2021, 3:14 a.m. | OK | GNU C++14 | TESTS | 12 | 93 | 4505600 | ||
125430425 | LONG__INT | B | Aug. 10, 2021, 1:31 a.m. | OK | GNU C++14 | TESTS | 12 | 93 | 4505600 | ||
125429427 | himanshu6 | B | Aug. 10, 2021, 1:08 a.m. | OK | GNU C++14 | TESTS | 12 | 93 | 4505600 | ||
125424954 | Chamo | B | Aug. 9, 2021, 10:40 p.m. | OK | GNU C++14 | TESTS | 12 | 93 | 4505600 | ||
125415571 | jxiao | B | Aug. 9, 2021, 7:06 p.m. | OK | GNU C++14 | TESTS | 12 | 93 | 4505600 | ||
125407722 | vky0579 | B | Aug. 9, 2021, 5:43 p.m. | OK | GNU C++14 | TESTS | 12 | 93 | 4505600 | ||
125439972 | prashik0 | B | Aug. 10, 2021, 4:16 a.m. | OK | GNU C++14 | TESTS | 12 | 93 | 5324800 | ||
125441752 | J_san | B | Aug. 10, 2021, 4:45 a.m. | OK | GNU C++14 | TESTS | 12 | 93 | 5734400 | ||
125445716 | DPair | B | Aug. 10, 2021, 5:44 a.m. | OK | GNU C++17 | TESTS | 12 | 46 | 5017600 | ||
125407810 | AhmedUCF | B | Aug. 9, 2021, 5:44 p.m. | OK | GNU C++17 | TESTS | 12 | 93 | 4096000 | ||
125446018 | rendy_ad89 | B | Aug. 10, 2021, 5:48 a.m. | OK | GNU C++17 | TESTS | 12 | 93 | 4505600 | ||
125445498 | G_r_v | B | Aug. 10, 2021, 5:41 a.m. | OK | GNU C++17 | TESTS | 12 | 93 | 4505600 | ||
125442475 | KillMonger10 | B | Aug. 10, 2021, 4:57 a.m. | OK | GNU C++17 | TESTS | 12 | 93 | 4505600 | ||
125442189 | tinycaterpillar | B | Aug. 10, 2021, 4:52 a.m. | OK | GNU C++17 | TESTS | 12 | 93 | 4505600 | ||
125441874 | MMSM | B | Aug. 10, 2021, 4:47 a.m. | OK | GNU C++17 | TESTS | 12 | 93 | 4505600 | ||
125441050 | mukeshyadav3651 | B | Aug. 10, 2021, 4:34 a.m. | OK | GNU C++17 | TESTS | 12 | 93 | 4505600 | ||
125440602 | mohammadomar | B | Aug. 10, 2021, 4:26 a.m. | OK | GNU C++17 | TESTS | 12 | 93 | 4505600 | ||
125439995 | v_vinay | B | Aug. 10, 2021, 4:16 a.m. | OK | GNU C++17 | TESTS | 12 | 93 | 4505600 | ||
125426289 | Tony102 | B | Aug. 9, 2021, 11:33 p.m. | OK | GNU C++17 (64) | TESTS | 12 | 61 | 8396800 | ||
125428044 | njwrz | B | Aug. 10, 2021, 12:32 a.m. | OK | GNU C++17 (64) | TESTS | 12 | 61 | 73011200 | ||
125445908 | Ch_Harsha | B | Aug. 10, 2021, 5:47 a.m. | OK | GNU C++17 (64) | TESTS | 12 | 62 | 5120000 | ||
125443509 | imThe1 | B | Aug. 10, 2021, 5:12 a.m. | OK | GNU C++17 (64) | TESTS | 12 | 62 | 5120000 | ||
125440677 | alif_cse_ju | B | Aug. 10, 2021, 4:28 a.m. | OK | GNU C++17 (64) | TESTS | 12 | 62 | 5120000 | ||
125435824 | Bu1bu1 | B | Aug. 10, 2021, 3:07 a.m. | OK | GNU C++17 (64) | TESTS | 12 | 62 | 5120000 | ||
125430039 | yazan_istatiyeh | B | Aug. 10, 2021, 1:22 a.m. | OK | GNU C++17 (64) | TESTS | 12 | 62 | 5120000 | ||
125420737 | Linkus | B | Aug. 9, 2021, 8:39 p.m. | OK | GNU C++17 (64) | TESTS | 12 | 62 | 5120000 | ||
125410328 | monster_coder | B | Aug. 9, 2021, 6:05 p.m. | OK | GNU C++17 (64) | TESTS | 12 | 62 | 5120000 | ||
125434151 | 203954 | B | Aug. 10, 2021, 2:40 a.m. | OK | GNU C++17 (64) | TESTS | 12 | 62 | 5836800 | ||
125429187 | pohzipohzi | B | Aug. 10, 2021, 1:02 a.m. | OK | Go | TESTS | 12 | 155 | 17305600 | ||
125432514 | Ikkkkkkms | B | Aug. 10, 2021, 2:13 a.m. | OK | Go | TESTS | 12 | 312 | 17305600 | ||
125437901 | Sumit_jha | B | Aug. 10, 2021, 3:42 a.m. | OK | Java 11 | TESTS | 12 | 233 | 23859200 | ||
125424686 | ujjwalbhan.ub | B | Aug. 9, 2021, 10:30 p.m. | OK | Java 11 | TESTS | 12 | 295 | 24064000 | ||
125405568 | pks24 | B | Aug. 9, 2021, 5:29 p.m. | OK | Java 11 | TESTS | 12 | 312 | 24780800 | ||
125440556 | coderrohan14 | B | Aug. 10, 2021, 4:25 a.m. | OK | Java 11 | TESTS | 12 | 327 | 24780800 | ||
125420478 | theslowprogrammer | B | Aug. 9, 2021, 8:32 p.m. | OK | Java 11 | TESTS | 12 | 327 | 24985600 | ||
125410479 | Ankitsks | B | Aug. 9, 2021, 6:06 p.m. | OK | Java 11 | TESTS | 12 | 327 | 24985600 | ||
125407696 | themadknight45 | B | Aug. 9, 2021, 5:43 p.m. | OK | Java 11 | TESTS | 12 | 327 | 25088000 | ||
125413082 | code_it_naman | B | Aug. 9, 2021, 6:34 p.m. | OK | Java 11 | TESTS | 12 | 327 | 30822400 | ||
125435789 | Sanju_250406 | B | Aug. 10, 2021, 3:06 a.m. | OK | Java 11 | TESTS | 12 | 342 | 24678400 | ||
125444039 | ssd_98 | B | Aug. 10, 2021, 5:20 a.m. | OK | Java 11 | TESTS | 12 | 343 | 28876800 | ||
125439271 | arpit31 | B | Aug. 10, 2021, 4:04 a.m. | OK | Java 8 | TESTS | 12 | 249 | 22630400 | ||
125436658 | freezingheven | B | Aug. 10, 2021, 3:21 a.m. | OK | Java 8 | TESTS | 12 | 264 | 21811200 | ||
125437998 | less_ordinary | B | Aug. 10, 2021, 3:43 a.m. | OK | Java 8 | TESTS | 12 | 264 | 22528000 | ||
125410883 | VishuTomar | B | Aug. 9, 2021, 6:10 p.m. | OK | Java 8 | TESTS | 12 | 265 | 21811200 | ||
125409649 | SAURABH16_ | B | Aug. 9, 2021, 5:59 p.m. | OK | Java 8 | TESTS | 12 | 265 | 22016000 | ||
125407512 | dark_rays | B | Aug. 9, 2021, 5:42 p.m. | OK | Java 8 | TESTS | 12 | 265 | 23347200 | ||
125424851 | AFF | B | Aug. 9, 2021, 10:36 p.m. | OK | Java 8 | TESTS | 12 | 280 | 21196800 | ||
125417142 | RonWonWon | B | Aug. 9, 2021, 7:30 p.m. | OK | Java 8 | TESTS | 12 | 280 | 21913600 | ||
125413144 | coolManit | B | Aug. 9, 2021, 6:35 p.m. | OK | Java 8 | TESTS | 12 | 280 | 22732800 | ||
125407245 | Gurtej | B | Aug. 9, 2021, 5:40 p.m. | OK | Java 8 | TESTS | 12 | 296 | 22528000 | ||
125443661 | ThinkingDobby | B | Aug. 10, 2021, 5:14 a.m. | OK | Kotlin | TESTS | 12 | 389 | 30310400 | ||
125415421 | huy.caohuyhuy123 | B | Aug. 9, 2021, 7:04 p.m. | OK | Kotlin | TESTS | 12 | 529 | 28876800 | ||
125437363 | xinjiurains. | B | Aug. 10, 2021, 3:32 a.m. | OK | MS C++ 2017 | TESTS | 12 | 124 | 4096000 | ||
125439277 | 202003021019 | B | Aug. 10, 2021, 4:04 a.m. | OK | MS C++ 2017 | TESTS | 12 | 139 | 4505600 | ||
125434248 | Shuai. | B | Aug. 10, 2021, 2:42 a.m. | OK | MS C++ 2017 | TESTS | 12 | 280 | 4505600 | ||
125429583 | Refrain_c | B | Aug. 10, 2021, 1:11 a.m. | OK | MS C++ 2017 | TESTS | 12 | 280 | 4505600 | ||
125424006 | tony.li4722 | B | Aug. 9, 2021, 10:08 p.m. | OK | MS C++ 2017 | TESTS | 12 | 296 | 4096000 | ||
125406981 | Tangerine | B | Aug. 9, 2021, 5:38 p.m. | OK | MS C++ 2017 | TESTS | 12 | 296 | 4505600 | ||
125436927 | ujjwalavishek | B | Aug. 10, 2021, 3:25 a.m. | OK | MS C++ 2017 | TESTS | 12 | 312 | 4505600 | ||
125430990 | Tagaki | B | Aug. 10, 2021, 1:43 a.m. | OK | MS C++ 2017 | TESTS | 12 | 312 | 11776000 | ||
125400738 | lilhe | B | Aug. 9, 2021, 4:31 p.m. | OK | MS C++ 2017 | TESTS | 12 | 343 | 4505600 | ||
125400175 | Sebstein | B | Aug. 9, 2021, 4:30 p.m. | OK | MS C++ 2017 | TESTS | 12 | 358 | 4505600 | ||
125432805 | guanghechen | B | Aug. 10, 2021, 2:18 a.m. | OK | Node.js | TESTS | 12 | 311 | 48537600 | ||
125432505 | guanghechen | B | Aug. 10, 2021, 2:12 a.m. | OK | Node.js | TESTS | 12 | 327 | 48025600 | ||
125430804 | henrychenOutlook | B | Aug. 10, 2021, 1:40 a.m. | OK | Node.js | TESTS | 12 | 390 | 45670400 | ||
125406168 | Bekzaat17 | B | Aug. 9, 2021, 5:32 p.m. | OK | PHP | TESTS | 12 | 546 | 22323200 | ||
125444306 | akanodia11 | B | Aug. 10, 2021, 5:23 a.m. | OK | PyPy 3 | TESTS | 12 | 265 | 44646400 | ||
125415849 | DebRC | B | Aug. 9, 2021, 7:10 p.m. | OK | PyPy 3 | TESTS | 12 | 280 | 37785600 | ||
125405302 | harshiit133 | B | Aug. 9, 2021, 5:28 p.m. | OK | PyPy 3 | TESTS | 12 | 312 | 53350400 | ||
125406023 | Austin231 | B | Aug. 9, 2021, 5:31 p.m. | OK | PyPy 3 | TESTS | 12 | 327 | 39014400 | ||
125416646 | Aestroix | B | Aug. 9, 2021, 7:22 p.m. | OK | PyPy 3 | TESTS | 12 | 327 | 46182400 | ||
125406747 | zayn. | B | Aug. 9, 2021, 5:36 p.m. | OK | PyPy 3 | TESTS | 12 | 358 | 43110400 | ||
125439287 | caow | B | Aug. 10, 2021, 4:04 a.m. | OK | PyPy 3 | TESTS | 12 | 374 | 50176000 | ||
125408902 | ljw538 | B | Aug. 9, 2021, 5:53 p.m. | OK | PyPy 3 | TESTS | 12 | 420 | 46387200 | ||
125439802 | Up_there | B | Aug. 10, 2021, 4:13 a.m. | OK | PyPy 3 | TESTS | 12 | 436 | 34304000 | ||
125410470 | RANK1ZEN | B | Aug. 9, 2021, 6:06 p.m. | OK | PyPy 3 | TESTS | 12 | 451 | 36864000 | ||
125401656 | Emillio | B | Aug. 9, 2021, 4:33 p.m. | OK | Python 3 | TESTS | 12 | 373 | 19148800 | ||
125409518 | i_aman | B | Aug. 9, 2021, 5:58 p.m. | OK | Python 3 | TESTS | 12 | 389 | 17100800 | ||
125414054 | Kant94 | B | Aug. 9, 2021, 6:47 p.m. | OK | Python 3 | TESTS | 12 | 405 | 17715200 | ||
125429914 | nsharc4 | B | Aug. 10, 2021, 1:19 a.m. | OK | Python 3 | TESTS | 12 | 405 | 17817600 | ||
125431390 | StarCout | B | Aug. 10, 2021, 1:52 a.m. | OK | Python 3 | TESTS | 12 | 436 | 20275200 | ||
125439415 | fzzf_wsh | B | Aug. 10, 2021, 4:06 a.m. | OK | Python 3 | TESTS | 12 | 436 | 22323200 | ||
125435396 | aman2000jaiswal14 | B | Aug. 10, 2021, 3 a.m. | OK | Python 3 | TESTS | 12 | 452 | 22220800 | ||
125413701 | dkharms | B | Aug. 9, 2021, 6:42 p.m. | OK | Python 3 | TESTS | 12 | 467 | 17203200 | ||
125402660 | guptaashim29 | B | Aug. 9, 2021, 4:34 p.m. | OK | Python 3 | TESTS | 12 | 467 | 17203200 | ||
125436661 | RedSpica | B | Aug. 10, 2021, 3:21 a.m. | OK | Python 3 | TESTS | 12 | 467 | 17510400 |
Back to search problems