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 |
---|---|---|---|---|---|---|
1638 | Codeforces Round 771 (Div. 2) | FINISHED | False | 7200 | 92330663 | Feb. 14, 2022, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 21087 ) | B | Odd Swap Sort | PROGRAMMING | data structures math sortings |
B'You are given an array a_1, a_2, ... , a_n . You can perform operations on the array. In each operation you can choose an integer i ( 1 <= i < n ), and swap elements a_i and a_{i+1} of the array, if a_i + a_{i+1} is odd. Determine whether it can be sorted in non-decreasing order using this operation any number of times. Each test contains multiple test cases. The first line contains a single integer t ( 1 <= t <= 10^5 ) -- the number of test cases. Description of the test cases follows. The first line of each test case contains a single integer n ( 1 <= n <= 10^5 ) -- the length of the array. The second line of each test case contains n integers a_1,a_2, ... , a_n ( 1 <= a_i <= 10^9 ) -- the elements of the array. It is guaranteed that the sum of n over all test cases does not exceed 2 cdot 10^5 . For each test case, print "Yes" or "No" depending on whether you can or can not sort the given array. You may print each letter in any case (for example, "YES", "Yes", "yes", "yEs" will all be recognized as positive answer). In the first test case, we can simply swap 31 and 14 ( 31 + 14 = 45 which is odd) and obtain the non-decreasing array [1,6,14,31] . In the second test case, the only way we could sort the array is by swapping 4 and 2 , but this is impossible, since their sum 4 + 2 = 6 is even. In the third test case, there is no way to make the array non-decreasing. In the fourth test case, the array is already non-decreasing. '... |
Codeforces Round #771 Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
146450713 | rainboy | B | Feb. 14, 2022, 8:03 p.m. | OK | GNU C11 | TESTS | 82 | 421 | 0 | ||
146471102 | Pawan_Lahoti | B | Feb. 15, 2022, 4:10 a.m. | OK | GNU C11 | TESTS | 82 | 421 | 819200 | ||
146425331 | loki_7 | B | Feb. 14, 2022, 4:28 p.m. | OK | GNU C11 | TESTS | 82 | 436 | 1740800 | ||
146427020 | nsu_Kilig | B | Feb. 14, 2022, 4:32 p.m. | OK | GNU C++14 | TESTS | 82 | 31 | 1331200 | ||
146469056 | 20203246 | B | Feb. 15, 2022, 3:40 a.m. | OK | GNU C++14 | TESTS | 82 | 31 | 1331200 | ||
146460502 | SuperJ6 | B | Feb. 15, 2022, 12:25 a.m. | OK | GNU C++14 | TESTS | 82 | 62 | 0 | ||
146472242 | 0822 | B | Feb. 15, 2022, 4:27 a.m. | OK | GNU C++14 | TESTS | 82 | 62 | 0 | ||
146465212 | n0I0c0K | B | Feb. 15, 2022, 2:30 a.m. | OK | GNU C++14 | TESTS | 82 | 62 | 0 | ||
146445371 | freakin23 | B | Feb. 14, 2022, 7:11 p.m. | OK | GNU C++14 | TESTS | 82 | 62 | 102400 | ||
146468634 | Inception02 | B | Feb. 15, 2022, 3:34 a.m. | OK | GNU C++14 | TESTS | 82 | 62 | 409600 | ||
146462883 | luogu_bot3 | B | Feb. 15, 2022, 1:37 a.m. | OK | GNU C++14 | TESTS | 82 | 62 | 409600 | ||
146469588 | liujiameng | B | Feb. 15, 2022, 3:48 a.m. | OK | GNU C++14 | TESTS | 82 | 62 | 409600 | ||
146470353 | YunTian | B | Feb. 15, 2022, 3:59 a.m. | OK | GNU C++14 | TESTS | 82 | 62 | 409600 | ||
146464946 | rbl_p | B | Feb. 15, 2022, 2:24 a.m. | OK | GNU C++17 | TESTS | 82 | 61 | 3993600 | ||
146453230 | SajibKC_19 | B | Feb. 14, 2022, 8:43 p.m. | OK | GNU C++17 | TESTS | 82 | 61 | 4812800 | ||
146461319 | Agent0007 | B | Feb. 15, 2022, 12:53 a.m. | OK | GNU C++17 | TESTS | 82 | 62 | 0 | ||
146449797 | rahulmallick1115 | B | Feb. 14, 2022, 7:51 p.m. | OK | GNU C++17 | TESTS | 82 | 62 | 0 | ||
146472971 | Mr_Crusher | B | Feb. 15, 2022, 4:38 a.m. | OK | GNU C++17 | TESTS | 82 | 62 | 0 | ||
146468393 | HyDreamer | B | Feb. 15, 2022, 3:30 a.m. | OK | GNU C++17 | TESTS | 82 | 62 | 0 | ||
146455033 | marS24 | B | Feb. 14, 2022, 9:18 p.m. | OK | GNU C++17 | TESTS | 82 | 62 | 204800 | ||
146456723 | DeadPixel99 | B | Feb. 14, 2022, 9:58 p.m. | OK | GNU C++17 | TESTS | 82 | 62 | 409600 | ||
146465509 | 94wxd | B | Feb. 15, 2022, 2:36 a.m. | OK | GNU C++17 | TESTS | 82 | 62 | 409600 | ||
146475146 | _C_H_M_ | B | Feb. 15, 2022, 5:07 a.m. | OK | GNU C++17 | TESTS | 82 | 62 | 409600 | ||
146459580 | PurpleCrayon | B | Feb. 14, 2022, 11:50 p.m. | OK | GNU C++17 (64) | TESTS | 82 | 46 | 0 | ||
146451212 | liyh | B | Feb. 14, 2022, 8:10 p.m. | OK | GNU C++17 (64) | TESTS | 82 | 46 | 409600 | ||
146463106 | CN_jie | B | Feb. 15, 2022, 1:43 a.m. | OK | GNU C++17 (64) | TESTS | 82 | 46 | 409600 | ||
146463129 | Mostafa_Moharram | B | Feb. 15, 2022, 1:44 a.m. | OK | GNU C++17 (64) | TESTS | 82 | 46 | 409600 | ||
146450612 | mesbah19 | B | Feb. 14, 2022, 8:01 p.m. | OK | GNU C++17 (64) | TESTS | 82 | 46 | 614400 | ||
146478843 | Tanzim_bn | B | Feb. 15, 2022, 5:53 a.m. | OK | GNU C++17 (64) | TESTS | 82 | 46 | 819200 | ||
146467197 | Crescend0 | B | Feb. 15, 2022, 3:09 a.m. | OK | GNU C++17 (64) | TESTS | 82 | 46 | 1126400 | ||
146466402 | lemongrab | B | Feb. 15, 2022, 2:53 a.m. | OK | GNU C++17 (64) | TESTS | 82 | 46 | 1228800 | ||
146463036 | BhaTTa | B | Feb. 15, 2022, 1:41 a.m. | OK | GNU C++17 (64) | TESTS | 82 | 46 | 1228800 | ||
146448462 | rishit3234 | B | Feb. 14, 2022, 7:35 p.m. | OK | GNU C++17 (64) | TESTS | 82 | 46 | 1228800 | ||
146459980 | happypotato1207 | B | Feb. 15, 2022, 12:06 a.m. | OK | GNU C++20 (64) | TESTS | 82 | 46 | 0 | ||
146452478 | Duldek | B | Feb. 14, 2022, 8:30 p.m. | OK | GNU C++20 (64) | TESTS | 82 | 46 | 0 | ||
146452008 | brobat | B | Feb. 14, 2022, 8:22 p.m. | OK | GNU C++20 (64) | TESTS | 82 | 46 | 0 | ||
146450090 | D_Dima | B | Feb. 14, 2022, 7:55 p.m. | OK | GNU C++20 (64) | TESTS | 82 | 46 | 0 | ||
146449478 | sumitvivek_001 | B | Feb. 14, 2022, 7:47 p.m. | OK | GNU C++20 (64) | TESTS | 82 | 46 | 0 | ||
146446812 | Pirated_Codes | B | Feb. 14, 2022, 7:20 p.m. | OK | GNU C++20 (64) | TESTS | 82 | 46 | 0 | ||
146446552 | mdolchik | B | Feb. 14, 2022, 7:18 p.m. | OK | GNU C++20 (64) | TESTS | 82 | 46 | 0 | ||
146445415 | IMANGINATOR | B | Feb. 14, 2022, 7:11 p.m. | OK | GNU C++20 (64) | TESTS | 82 | 46 | 0 | ||
146461591 | DippleThree | B | Feb. 15, 2022, 1:02 a.m. | OK | GNU C++20 (64) | TESTS | 82 | 46 | 0 | ||
146472966 | imtiyazrasool92 | B | Feb. 15, 2022, 4:38 a.m. | OK | GNU C++20 (64) | TESTS | 82 | 46 | 0 | ||
146462790 | flash500 | B | Feb. 15, 2022, 1:34 a.m. | OK | Go | TESTS | 82 | 171 | 4608000 | ||
146446912 | rdamir86 | B | Feb. 14, 2022, 7:21 p.m. | OK | Go | TESTS | 82 | 202 | 4608000 | ||
146425120 | persevering | B | Feb. 14, 2022, 4:27 p.m. | OK | Go | TESTS | 82 | 233 | 6451200 | ||
146462557 | meooow | B | Feb. 15, 2022, 1:28 a.m. | OK | Haskell | TESTS | 82 | 93 | 9420800 | ||
146425266 | Satyaa | B | Feb. 14, 2022, 4:28 p.m. | OK | Java 11 | TESTS | 82 | 202 | 0 | ||
146459225 | robinz62 | B | Feb. 14, 2022, 11:35 p.m. | OK | Java 11 | TESTS | 82 | 202 | 0 | ||
146448805 | S-A-I-T-A-M-A | B | Feb. 14, 2022, 7:39 p.m. | OK | Java 11 | TESTS | 82 | 202 | 0 | ||
146425573 | Halix | B | Feb. 14, 2022, 4:29 p.m. | OK | Java 11 | TESTS | 82 | 218 | 0 | ||
146474036 | msarthak | B | Feb. 15, 2022, 4:52 a.m. | OK | Java 11 | TESTS | 82 | 218 | 0 | ||
146467926 | sauravmandal | B | Feb. 15, 2022, 3:22 a.m. | OK | Java 11 | TESTS | 82 | 218 | 0 | ||
146450255 | KarMa_ | B | Feb. 14, 2022, 7:57 p.m. | OK | Java 11 | TESTS | 82 | 218 | 0 | ||
146422920 | Sandy_coder2001 | B | Feb. 14, 2022, 4:21 p.m. | OK | Java 11 | TESTS | 82 | 218 | 0 | ||
146477807 | CrinklyGolem | B | Feb. 15, 2022, 5:41 a.m. | OK | Java 11 | TESTS | 82 | 233 | 0 | ||
146470522 | krishnagskr983 | B | Feb. 15, 2022, 4:02 a.m. | OK | Java 11 | TESTS | 82 | 234 | 0 | ||
146458795 | liheman | B | Feb. 14, 2022, 11:04 p.m. | OK | Java 8 | TESTS | 82 | 140 | 0 | ||
146470863 | aryaman_571 | B | Feb. 15, 2022, 4:07 a.m. | OK | Java 8 | TESTS | 82 | 155 | 0 | ||
146463142 | ved20 | B | Feb. 15, 2022, 1:44 a.m. | OK | Java 8 | TESTS | 82 | 155 | 0 | ||
146475724 | SainiAayush | B | Feb. 15, 2022, 5:15 a.m. | OK | Java 8 | TESTS | 82 | 171 | 0 | ||
146462508 | lcheeme1 | B | Feb. 15, 2022, 1:28 a.m. | OK | Java 8 | TESTS | 82 | 171 | 0 | ||
146450155 | Mohamed_A7med | B | Feb. 14, 2022, 7:56 p.m. | OK | Java 8 | TESTS | 82 | 171 | 0 | ||
146479152 | P_Key26dec | B | Feb. 15, 2022, 5:57 a.m. | OK | Java 8 | TESTS | 82 | 171 | 21708800 | ||
146466882 | aggarwalanshul01 | B | Feb. 15, 2022, 3:02 a.m. | OK | Java 8 | TESTS | 82 | 186 | 7987200 | ||
146422307 | g906360 | B | Feb. 14, 2022, 4:20 p.m. | OK | Java 8 | TESTS | 82 | 187 | 102400 | ||
146446982 | Atuer | B | Feb. 14, 2022, 7:21 p.m. | OK | Java 8 | TESTS | 82 | 202 | 0 | ||
146455543 | PER | B | Feb. 14, 2022, 9:28 p.m. | OK | Kotlin 1.5 | TESTS | 82 | 919 | 5120000 | ||
146473653 | fragilistic | B | Feb. 15, 2022, 4:47 a.m. | OK | Mono C# | TESTS | 82 | 374 | 22425600 | ||
146477610 | LuckyInaba14 | B | Feb. 15, 2022, 5:39 a.m. | OK | MS C++ 2017 | TESTS | 82 | 78 | 1638400 | ||
146451118 | misaka12435 | B | Feb. 14, 2022, 8:09 p.m. | OK | MS C++ 2017 | TESTS | 82 | 420 | 409600 | ||
146469619 | Ir0nic_Joker | B | Feb. 15, 2022, 3:49 a.m. | OK | MS C++ 2017 | TESTS | 82 | 436 | 0 | ||
146477517 | Butyrka228 | B | Feb. 15, 2022, 5:38 a.m. | OK | MS C++ 2017 | TESTS | 82 | 467 | 1638400 | ||
146464324 | _Rimjhim_36 | B | Feb. 15, 2022, 2:12 a.m. | OK | MS C++ 2017 | TESTS | 82 | 467 | 1945600 | ||
146474653 | DikshantAvi | B | Feb. 15, 2022, 5:01 a.m. | OK | MS C++ 2017 | TESTS | 82 | 467 | 3174400 | ||
146466517 | capability_Wu | B | Feb. 15, 2022, 2:55 a.m. | OK | MS C++ 2017 | TESTS | 82 | 468 | 1945600 | ||
146447469 | MRX7 | B | Feb. 14, 2022, 7:26 p.m. | OK | MS C++ 2017 | TESTS | 82 | 483 | 819200 | ||
146467665 | DikshantAvi | B | Feb. 15, 2022, 3:17 a.m. | OK | MS C++ 2017 | TESTS | 82 | 514 | 5632000 | ||
146447716 | suraj | B | Feb. 14, 2022, 7:28 p.m. | OK | .NET Core C# | TESTS | 82 | 405 | 19353600 | ||
146462088 | postnerd | B | Feb. 15, 2022, 1:16 a.m. | OK | Node.js | TESTS | 82 | 670 | 26521600 | ||
146458269 | _con | B | Feb. 14, 2022, 10:46 p.m. | OK | Node.js | TESTS | 82 | 686 | 26214400 | ||
146463088 | ddcovery | B | Feb. 15, 2022, 1:42 a.m. | OK | Node.js | TESTS | 82 | 748 | 26726400 | ||
146419823 | BlackPeacock | B | Feb. 14, 2022, 4:13 p.m. | OK | Node.js | TESTS | 82 | 966 | 21504000 | ||
146445293 | 1_2_3_4_5_9 | B | Feb. 14, 2022, 7:11 p.m. | OK | PyPy 2 | TESTS | 82 | 187 | 14028800 | ||
146472941 | mnkqc | B | Feb. 15, 2022, 4:37 a.m. | OK | PyPy 3 | TESTS | 82 | 218 | 12800000 | ||
146473139 | mnkqc | B | Feb. 15, 2022, 4:40 a.m. | OK | PyPy 3 | TESTS | 82 | 218 | 15360000 | ||
146477122 | feelme | B | Feb. 15, 2022, 5:33 a.m. | OK | PyPy 3 | TESTS | 82 | 233 | 15257600 | ||
146455574 | hritik3878 | B | Feb. 14, 2022, 9:29 p.m. | OK | PyPy 3 | TESTS | 82 | 280 | 15872000 | ||
146472175 | Adolf988 | B | Feb. 15, 2022, 4:26 a.m. | OK | PyPy 3 | TESTS | 82 | 280 | 17305600 | ||
146454764 | Pheonix23 | B | Feb. 14, 2022, 9:12 p.m. | OK | PyPy 3 | TESTS | 82 | 342 | 15872000 | ||
146445197 | NecroSean38 | B | Feb. 14, 2022, 7:10 p.m. | OK | PyPy 3 | TESTS | 82 | 343 | 15974400 | ||
146479570 | tharun_99 | B | Feb. 15, 2022, 6:01 a.m. | OK | PyPy 3 | TESTS | 82 | 358 | 14028800 | ||
146454176 | axe98 | B | Feb. 14, 2022, 9:01 p.m. | OK | PyPy 3 | TESTS | 82 | 374 | 13619200 | ||
146473616 | _nathan_drake_ | B | Feb. 15, 2022, 4:47 a.m. | OK | PyPy 3 | TESTS | 82 | 374 | 13926400 | ||
146473111 | mnkqc | B | Feb. 15, 2022, 4:40 a.m. | OK | PyPy 3-64 | TESTS | 82 | 155 | 26931200 | ||
146445934 | Aksnov | B | Feb. 14, 2022, 7:14 p.m. | OK | PyPy 3-64 | TESTS | 82 | 187 | 21606400 | ||
146452440 | yusinv | B | Feb. 14, 2022, 8:30 p.m. | OK | PyPy 3-64 | TESTS | 82 | 218 | 25190400 | ||
146477208 | mayank35 | B | Feb. 15, 2022, 5:34 a.m. | OK | PyPy 3-64 | TESTS | 82 | 218 | 27136000 | ||
146452502 | IkshitG | B | Feb. 14, 2022, 8:31 p.m. | OK | PyPy 3-64 | TESTS | 82 | 233 | 19865600 | ||
146458343 | bpdolson | B | Feb. 14, 2022, 10:48 p.m. | OK | PyPy 3-64 | TESTS | 82 | 249 | 26521600 | ||
146453555 | raushnn | B | Feb. 14, 2022, 8:49 p.m. | OK | PyPy 3-64 | TESTS | 82 | 249 | 27033600 | ||
146466953 | manojsagar066 | B | Feb. 15, 2022, 3:04 a.m. | OK | PyPy 3-64 | TESTS | 82 | 264 | 17612800 | ||
146464055 | rutz12 | B | Feb. 15, 2022, 2:06 a.m. | OK | PyPy 3-64 | TESTS | 82 | 264 | 21504000 | ||
146478043 | TerminalWarlord | B | Feb. 15, 2022, 5:43 a.m. | OK | PyPy 3-64 | TESTS | 82 | 280 | 21913600 | ||
146445566 | OLOGY | B | Feb. 14, 2022, 7:12 p.m. | OK | Python 2 | TESTS | 82 | 233 | 7577600 | ||
146457893 | OLOGY | B | Feb. 14, 2022, 10:32 p.m. | OK | Python 2 | TESTS | 82 | 280 | 7782400 | ||
146477540 | ramjeeraghu | B | Feb. 15, 2022, 5:38 a.m. | OK | Python 3 | TESTS | 82 | 280 | 10240000 | ||
146454145 | axe98 | B | Feb. 14, 2022, 9 p.m. | OK | Python 3 | TESTS | 82 | 311 | 7782400 | ||
146468437 | Dahoas | B | Feb. 15, 2022, 3:31 a.m. | OK | Python 3 | TESTS | 82 | 311 | 9011200 | ||
146472567 | Srirambabu | B | Feb. 15, 2022, 4:32 a.m. | OK | Python 3 | TESTS | 82 | 389 | 10444800 | ||
146469514 | pennymagic156 | B | Feb. 15, 2022, 3:47 a.m. | OK | Python 3 | TESTS | 82 | 405 | 9523200 | ||
146467265 | eugalt | B | Feb. 15, 2022, 3:10 a.m. | OK | Python 3 | TESTS | 82 | 405 | 9932800 | ||
146469573 | pennymagic156 | B | Feb. 15, 2022, 3:48 a.m. | OK | Python 3 | TESTS | 82 | 405 | 10342400 | ||
146473804 | _nathan_drake_ | B | Feb. 15, 2022, 4:49 a.m. | OK | Python 3 | TESTS | 82 | 420 | 10444800 | ||
146473769 | _nathan_drake_ | B | Feb. 15, 2022, 4:48 a.m. | OK | Python 3 | TESTS | 82 | 421 | 10444800 | ||
146427923 | ankur.vision | B | Feb. 14, 2022, 4:34 p.m. | OK | Python 3 | TESTS | 82 | 421 | 12697600 |
Back to search problems