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 |
---|---|---|---|---|---|---|
1747 | Codeforces Round 832 (Div. 2) | FINISHED | False | 7200 | 69607463 | Nov. 4, 2022, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 21673 ) | C | Swap Game | PROGRAMMING | games |
B'Alice and Bob are playing a game on an array a of n positive integers. Alice and Bob make alternating moves with Alice going first. In his/her turn, the player makes the following move: Determine the winner of the game if both players play optimally. The input consists of multiple test cases. The first line contains a single integer t (1 <= q t <= q 2 cdot 10^4) -- the number of test cases. The description of the test cases follows. The first line of each test case contains a single integer n (2 <= q n <= q 10^5) -- the length of the array a . The second line of each test case contains n integers a_1,a_2 ldots a_n (1 <= q a_i <= q 10^9) -- the elements of the array a . It is guaranteed that sum of n over all test cases does not exceed 2 cdot 10^5 . For each test case, if Alice will win the game, output "Alice". Otherwise, output "Bob". You can output each letter in any case. For example, "alIcE", "Alice", "alice" will all be considered identical. In the first testcase, in her turn, Alice can only choose i = 2 , making the array equal [1, 0] . Then Bob, in his turn, will also choose i = 2 and make the array equal [0, 0] . As a_1 = 0 , Alice loses. In the second testcase, once again, players can only choose i = 2 . Then the array will change as follows: [2, 1] to [1, 1] to [1, 0] to [0, 0] , and Bob loses. In the third testcase, we can show that Alice has a winning strategy. '... |
Codeforces Round #832 (Div. 2) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
179284521 | SD8 | C | Nov. 4, 2022, 4:34 p.m. | OK | C# 8 | TESTS | 29 | 171 | 17100800 | ||
179335453 | 55open | C | Nov. 5, 2022, 12:58 a.m. | OK | Clang++17 Diagnostics | TESTS | 29 | 93 | 0 | ||
179279160 | cyrus_msk | C | Nov. 4, 2022, 4:23 p.m. | OK | D | TESTS | 29 | 77 | 13516800 | ||
179303832 | ruban | C | Nov. 4, 2022, 6:30 p.m. | OK | Delphi | TESTS | 29 | 93 | 10547200 | ||
179315114 | SP2003 | C | Nov. 4, 2022, 7:30 p.m. | OK | GNU C11 | TESTS | 29 | 108 | 0 | ||
179319772 | nestor_makhno | C | Nov. 4, 2022, 8:02 p.m. | OK | GNU C11 | TESTS | 29 | 109 | 0 | ||
179301203 | XingU | C | Nov. 4, 2022, 6:15 p.m. | OK | GNU C11 | TESTS | 29 | 109 | 819200 | ||
179306887 | mskbs_038 | C | Nov. 4, 2022, 6:46 p.m. | OK | GNU C11 | TESTS | 29 | 124 | 409600 | ||
179305162 | Abhishek_Tewatia | C | Nov. 4, 2022, 6:36 p.m. | OK | GNU C11 | TESTS | 29 | 124 | 819200 | ||
179301862 | jumboShrimp | C | Nov. 4, 2022, 6:19 p.m. | OK | GNU C11 | TESTS | 29 | 124 | 819200 | ||
179279564 | Scourge_Seraph | C | Nov. 4, 2022, 4:24 p.m. | OK | GNU C11 | TESTS | 29 | 124 | 1228800 | ||
179283486 | abhisheknimmala | C | Nov. 4, 2022, 4:32 p.m. | OK | GNU C11 | TESTS | 29 | 124 | 2048000 | ||
179338696 | Miraemon | C | Nov. 5, 2022, 2:13 a.m. | OK | GNU C11 | TESTS | 29 | 140 | 819200 | ||
179336687 | tokitsukaze | C | Nov. 5, 2022, 1:31 a.m. | OK | GNU C++14 | TESTS | 29 | 46 | 1228800 | ||
179338926 | hhoppitree | C | Nov. 5, 2022, 2:17 a.m. | OK | GNU C++14 | TESTS | 29 | 62 | 0 | ||
179371626 | David_jiangyulin | C | Nov. 5, 2022, 6 a.m. | OK | GNU C++14 | TESTS | 29 | 62 | 0 | ||
179338945 | Xanadu13 | C | Nov. 5, 2022, 2:18 a.m. | OK | GNU C++14 | TESTS | 29 | 62 | 0 | ||
179334474 | Obsession_de_Population | C | Nov. 5, 2022, 12:30 a.m. | OK | GNU C++14 | TESTS | 29 | 62 | 0 | ||
179303869 | kritipandey | C | Nov. 4, 2022, 6:30 p.m. | OK | GNU C++14 | TESTS | 29 | 62 | 0 | ||
179303160 | gojus | C | Nov. 4, 2022, 6:26 p.m. | OK | GNU C++14 | TESTS | 29 | 62 | 0 | ||
179290345 | Heisenburg-120 | C | Nov. 4, 2022, 5:21 p.m. | OK | GNU C++14 | TESTS | 29 | 62 | 0 | ||
179289644 | NoInternetName | C | Nov. 4, 2022, 5:19 p.m. | OK | GNU C++14 | TESTS | 29 | 62 | 0 | ||
179282664 | _Subrata | C | Nov. 4, 2022, 4:31 p.m. | OK | GNU C++14 | TESTS | 29 | 62 | 0 | ||
179340571 | XiaoWhy | C | Nov. 5, 2022, 2:44 a.m. | OK | GNU C++17 | TESTS | 29 | 46 | 2048000 | ||
179347669 | arpitblagan27 | C | Nov. 5, 2022, 4:36 a.m. | OK | GNU C++17 | TESTS | 29 | 62 | 0 | ||
179371291 | venlumi | C | Nov. 5, 2022, 5:57 a.m. | OK | GNU C++17 | TESTS | 29 | 62 | 0 | ||
179336872 | shihapfdim | C | Nov. 5, 2022, 1:36 a.m. | OK | GNU C++17 | TESTS | 29 | 62 | 0 | ||
179290040 | helenmie | C | Nov. 4, 2022, 5:20 p.m. | OK | GNU C++17 | TESTS | 29 | 62 | 0 | ||
179306292 | Youssef_Shaban0 | C | Nov. 4, 2022, 6:43 p.m. | OK | GNU C++17 | TESTS | 29 | 62 | 0 | ||
179313257 | medeshi.kristian | C | Nov. 4, 2022, 7:18 p.m. | OK | GNU C++17 | TESTS | 29 | 62 | 0 | ||
179316416 | despairing_god | C | Nov. 4, 2022, 7:39 p.m. | OK | GNU C++17 | TESTS | 29 | 62 | 0 | ||
179325835 | Hyari | C | Nov. 4, 2022, 9:05 p.m. | OK | GNU C++17 | TESTS | 29 | 62 | 0 | ||
179332353 | nonrice | C | Nov. 4, 2022, 11:17 p.m. | OK | GNU C++17 | TESTS | 29 | 62 | 0 | ||
179347621 | Utsav-Ladani | C | Nov. 5, 2022, 4:36 a.m. | OK | GNU C++17 (64) | TESTS | 29 | 46 | 0 | ||
179317638 | ithinkimloosingmymind | C | Nov. 4, 2022, 7:47 p.m. | OK | GNU C++17 (64) | TESTS | 29 | 46 | 0 | ||
179280099 | fojlerabbi2829 | C | Nov. 4, 2022, 4:25 p.m. | OK | GNU C++17 (64) | TESTS | 29 | 46 | 0 | ||
179314606 | Awesome3.14 | C | Nov. 4, 2022, 7:27 p.m. | OK | GNU C++17 (64) | TESTS | 29 | 46 | 409600 | ||
179334764 | xhgua | C | Nov. 5, 2022, 12:39 a.m. | OK | GNU C++17 (64) | TESTS | 29 | 46 | 409600 | ||
179331205 | PurpleCrayon | C | Nov. 4, 2022, 10:48 p.m. | OK | GNU C++17 (64) | TESTS | 29 | 46 | 409600 | ||
179327291 | enslaved | C | Nov. 4, 2022, 9:27 p.m. | OK | GNU C++17 (64) | TESTS | 29 | 46 | 409600 | ||
179327084 | Khaled93 | C | Nov. 4, 2022, 9:24 p.m. | OK | GNU C++17 (64) | TESTS | 29 | 46 | 409600 | ||
179320170 | shaanjijoe2 | C | Nov. 4, 2022, 8:05 p.m. | OK | GNU C++17 (64) | TESTS | 29 | 46 | 409600 | ||
179301976 | mesbah19 | C | Nov. 4, 2022, 6:19 p.m. | OK | GNU C++17 (64) | TESTS | 29 | 46 | 409600 | ||
179299818 | SAYANJIT7 | C | Nov. 4, 2022, 6:07 p.m. | OK | GNU C++20 (64) | TESTS | 29 | 15 | 512000 | ||
179334775 | XiCen | C | Nov. 5, 2022, 12:39 a.m. | OK | GNU C++20 (64) | TESTS | 29 | 31 | 0 | ||
179344414 | jdurie | C | Nov. 5, 2022, 3:47 a.m. | OK | GNU C++20 (64) | TESTS | 29 | 31 | 0 | ||
179294314 | Youssef_khaled80 | C | Nov. 4, 2022, 5:39 p.m. | OK | GNU C++20 (64) | TESTS | 29 | 31 | 409600 | ||
179334317 | xelsink1 | C | Nov. 5, 2022, 12:24 a.m. | OK | GNU C++20 (64) | TESTS | 29 | 31 | 819200 | ||
179283733 | YaliCai | C | Nov. 4, 2022, 4:33 p.m. | OK | GNU C++20 (64) | TESTS | 29 | 31 | 2457600 | ||
179352110 | sabbirMusfique | C | Nov. 5, 2022, 5:32 a.m. | OK | GNU C++20 (64) | TESTS | 29 | 46 | 0 | ||
179371430 | idontknowwhyiamheree | C | Nov. 5, 2022, 5:58 a.m. | OK | GNU C++20 (64) | TESTS | 29 | 46 | 0 | ||
179351660 | Me_Noob_Coder | C | Nov. 5, 2022, 5:27 a.m. | OK | GNU C++20 (64) | TESTS | 29 | 46 | 0 | ||
179349228 | sabbir_063 | C | Nov. 5, 2022, 4:58 a.m. | OK | GNU C++20 (64) | TESTS | 29 | 46 | 0 | ||
179290836 | D05T0N | C | Nov. 4, 2022, 5:23 p.m. | OK | Go | TESTS | 29 | 46 | 49356800 | ||
179348440 | sf14t | C | Nov. 5, 2022, 4:47 a.m. | OK | Java 11 | TESTS | 29 | 202 | 0 | ||
179311783 | thestudi | C | Nov. 4, 2022, 7:09 p.m. | OK | Java 11 | TESTS | 29 | 202 | 0 | ||
179312629 | saiharish | C | Nov. 4, 2022, 7:14 p.m. | OK | Java 11 | TESTS | 29 | 217 | 0 | ||
179291945 | Spidey2182 | C | Nov. 4, 2022, 5:28 p.m. | OK | Java 11 | TESTS | 29 | 217 | 0 | ||
179326152 | henrychenOutlook | C | Nov. 4, 2022, 9:09 p.m. | OK | Java 11 | TESTS | 29 | 218 | 0 | ||
179301013 | peiyeliu | C | Nov. 4, 2022, 6:14 p.m. | OK | Java 11 | TESTS | 29 | 218 | 0 | ||
179310387 | amanpatel23 | C | Nov. 4, 2022, 7 p.m. | OK | Java 11 | TESTS | 29 | 233 | 0 | ||
179349519 | GoldenShadow | C | Nov. 5, 2022, 5:02 a.m. | OK | Java 11 | TESTS | 29 | 233 | 0 | ||
179280619 | sunaj | C | Nov. 4, 2022, 4:26 p.m. | OK | Java 11 | TESTS | 29 | 233 | 0 | ||
179339323 | aditya2024 | C | Nov. 5, 2022, 2:24 a.m. | OK | Java 11 | TESTS | 29 | 264 | 0 | ||
179282447 | Vrutik_2809 | C | Nov. 4, 2022, 4:30 p.m. | OK | Java 17 | TESTS | 29 | 202 | 512000 | ||
179296828 | abhayptsr | C | Nov. 4, 2022, 5:52 p.m. | OK | Java 17 | TESTS | 29 | 218 | 409600 | ||
179281249 | koolkartik | C | Nov. 4, 2022, 4:28 p.m. | OK | Java 17 | TESTS | 29 | 264 | 1024000 | ||
179339705 | alibaba | C | Nov. 5, 2022, 2:30 a.m. | OK | Java 17 | TESTS | 29 | 265 | 1433600 | ||
179282202 | Restricted | C | Nov. 4, 2022, 4:30 p.m. | OK | Java 17 | TESTS | 29 | 295 | 1536000 | ||
179358538 | gaurav_22 | C | Nov. 5, 2022, 5:41 a.m. | OK | Java 17 | TESTS | 29 | 311 | 5734400 | ||
179282219 | alexis779 | C | Nov. 4, 2022, 4:30 p.m. | OK | Java 17 | TESTS | 29 | 327 | 5324800 | ||
179335399 | code_my_way123 | C | Nov. 5, 2022, 12:56 a.m. | OK | Java 17 | TESTS | 29 | 529 | 1228800 | ||
179329778 | Kay0 | C | Nov. 4, 2022, 10:14 p.m. | OK | Java 17 | TESTS | 29 | 529 | 1228800 | ||
179301936 | Sanskar0407 | C | Nov. 4, 2022, 6:19 p.m. | OK | Java 17 | TESTS | 29 | 561 | 819200 | ||
179280414 | Zahid_Hasan_Sahin | C | Nov. 4, 2022, 4:26 p.m. | OK | Java 8 | TESTS | 29 | 109 | 0 | ||
179311732 | 0.00 | C | Nov. 4, 2022, 7:08 p.m. | OK | Java 8 | TESTS | 29 | 124 | 0 | ||
179371125 | aryaman_571 | C | Nov. 5, 2022, 5:55 a.m. | OK | Java 8 | TESTS | 29 | 140 | 0 | ||
179370837 | aryaman_571 | C | Nov. 5, 2022, 5:51 a.m. | OK | Java 8 | TESTS | 29 | 140 | 0 | ||
179342086 | Swaroop369 | C | Nov. 5, 2022, 3:09 a.m. | OK | Java 8 | TESTS | 29 | 140 | 0 | ||
179305278 | Abdallah_Ragab00 | C | Nov. 4, 2022, 6:37 p.m. | OK | Java 8 | TESTS | 29 | 140 | 0 | ||
179370613 | gssakash | C | Nov. 5, 2022, 5:49 a.m. | OK | Java 8 | TESTS | 29 | 155 | 0 | ||
179368257 | frey4 | C | Nov. 5, 2022, 5:42 a.m. | OK | Java 8 | TESTS | 29 | 155 | 0 | ||
179291492 | mohamedhassan_c | C | Nov. 4, 2022, 5:26 p.m. | OK | Java 8 | TESTS | 29 | 155 | 0 | ||
179288657 | NerfThis | C | Nov. 4, 2022, 5:16 p.m. | OK | Java 8 | TESTS | 29 | 156 | 0 | ||
179310181 | gosugdr | C | Nov. 4, 2022, 6:59 p.m. | OK | Kotlin 1.6 | TESTS | 29 | 249 | 0 | ||
179293316 | bestgreenie | C | Nov. 4, 2022, 5:34 p.m. | OK | MS C++ 2017 | TESTS | 29 | 78 | 409600 | ||
179289355 | tatianyi | C | Nov. 4, 2022, 5:18 p.m. | OK | MS C++ 2017 | TESTS | 29 | 78 | 409600 | ||
179336680 | LiuZhaocheng | C | Nov. 5, 2022, 1:31 a.m. | OK | MS C++ 2017 | TESTS | 29 | 187 | 409600 | ||
179279776 | ArigashiKashi | C | Nov. 4, 2022, 4:24 p.m. | OK | MS C++ 2017 | TESTS | 29 | 202 | 409600 | ||
179333772 | tjdvyzl12345 | C | Nov. 5, 2022, 12:04 a.m. | OK | MS C++ 2017 | TESTS | 29 | 249 | 0 | ||
179349252 | wawawawa1 | C | Nov. 5, 2022, 4:58 a.m. | OK | MS C++ 2017 | TESTS | 29 | 264 | 409600 | ||
179283493 | CHARAN_REDDIE | C | Nov. 4, 2022, 4:32 p.m. | OK | MS C++ 2017 | TESTS | 29 | 264 | 409600 | ||
179280724 | osato | C | Nov. 4, 2022, 4:26 p.m. | OK | Node.js | TESTS | 29 | 265 | 14233600 | ||
179345279 | hkwu6013 | C | Nov. 5, 2022, 4:01 a.m. | OK | PyPy 3 | TESTS | 29 | 170 | 14131200 | ||
179294936 | golo | C | Nov. 4, 2022, 5:42 p.m. | OK | PyPy 3 | TESTS | 29 | 452 | 15974400 | ||
179350897 | STAR_ANONYMOUS | C | Nov. 5, 2022, 5:18 a.m. | OK | PyPy 3 | TESTS | 29 | 654 | 13926400 | ||
179296865 | Noman3050 | C | Nov. 4, 2022, 5:52 p.m. | OK | PyPy 3 | TESTS | 29 | 670 | 13926400 | ||
179289513 | Homeo | C | Nov. 4, 2022, 5:18 p.m. | OK | PyPy 3 | TESTS | 29 | 685 | 13824000 | ||
179281963 | jaguar_f_type_v8 | C | Nov. 4, 2022, 4:29 p.m. | OK | PyPy 3 | TESTS | 29 | 701 | 13824000 | ||
179345104 | jash93 | C | Nov. 5, 2022, 3:58 a.m. | OK | PyPy 3 | TESTS | 29 | 701 | 13926400 | ||
179344674 | FrozenKandy | C | Nov. 5, 2022, 3:52 a.m. | OK | PyPy 3-64 | TESTS | 29 | 108 | 17305600 | ||
179305251 | zouyu9631 | C | Nov. 4, 2022, 6:37 p.m. | OK | PyPy 3-64 | TESTS | 29 | 109 | 26624000 | ||
179282302 | sleepy-lynx | C | Nov. 4, 2022, 4:30 p.m. | OK | PyPy 3-64 | TESTS | 29 | 124 | 16896000 | ||
179306862 | M7moud_Ala3rj | C | Nov. 4, 2022, 6:46 p.m. | OK | PyPy 3-64 | TESTS | 29 | 124 | 18636800 | ||
179371324 | KanishkGoel | C | Nov. 5, 2022, 5:57 a.m. | OK | PyPy 3-64 | TESTS | 29 | 124 | 25497600 | ||
179301144 | roaris | C | Nov. 4, 2022, 6:15 p.m. | OK | PyPy 3-64 | TESTS | 29 | 124 | 26112000 | ||
179299041 | biglunchdude | C | Nov. 4, 2022, 6:04 p.m. | OK | PyPy 3-64 | TESTS | 29 | 139 | 16998400 | ||
179289852 | omar.gawdat | C | Nov. 4, 2022, 5:20 p.m. | OK | PyPy 3-64 | TESTS | 29 | 139 | 25497600 | ||
179284523 | abcsumit | C | Nov. 4, 2022, 4:34 p.m. | OK | PyPy 3-64 | TESTS | 29 | 155 | 16793600 | ||
179336882 | olivermaxwell112358 | C | Nov. 5, 2022, 1:36 a.m. | OK | PyPy 3-64 | TESTS | 29 | 155 | 16998400 | ||
179298348 | eugalt | C | Nov. 4, 2022, 6:01 p.m. | OK | Python 3 | TESTS | 29 | 139 | 12492800 | ||
179281285 | itamarbiran | C | Nov. 4, 2022, 4:28 p.m. | OK | Python 3 | TESTS | 29 | 248 | 10137600 | ||
179289043 | MB8097 | C | Nov. 4, 2022, 5:17 p.m. | OK | Python 3 | TESTS | 29 | 249 | 10240000 | ||
179283909 | XxDeathRacerxX | C | Nov. 4, 2022, 4:33 p.m. | OK | Python 3 | TESTS | 29 | 249 | 10240000 | ||
179313213 | vishnesh | C | Nov. 4, 2022, 7:18 p.m. | OK | Python 3 | TESTS | 29 | 249 | 10342400 | ||
179332512 | lukerry | C | Nov. 4, 2022, 11:22 p.m. | OK | Python 3 | TESTS | 29 | 264 | 10137600 | ||
179281938 | Priyansh_23May | C | Nov. 4, 2022, 4:29 p.m. | OK | Python 3 | TESTS | 29 | 264 | 10240000 | ||
179279672 | Vitru | C | Nov. 4, 2022, 4:24 p.m. | OK | Python 3 | TESTS | 29 | 264 | 10240000 | ||
179328335 | Mirali | C | Nov. 4, 2022, 9:44 p.m. | OK | Python 3 | TESTS | 29 | 264 | 10342400 | ||
179297963 | Dinesh_devanaboina | C | Nov. 4, 2022, 5:58 p.m. | OK | Python 3 | TESTS | 29 | 264 | 10342400 | ||
179347308 | dohyeokkim | C | Nov. 5, 2022, 4:31 a.m. | OK | Rust 2021 | TESTS | 29 | 171 | 9523200 | ||
179340002 | tongtongac | C | Nov. 5, 2022, 2:35 a.m. | OK | Rust 2021 | TESTS | 29 | 218 | 9932800 |
Back to search problems