Codeforces Round 1084 (Div. 3)

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
2200 Codeforces Round 1084 (Div. 3) FINISHED False 8100 4202723 Feb. 27, 2026, 2:35 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 7686 ) E Divisive Battle PROGRAMMING games greedy math number theory

Alice and Bob are playing game on array (a) initially containing (n) positive integers, with Alice going first. On each player's turn, if (a) is non-decreasing(^{\text{∗}}), the game immediately ends. Otherwise, the player can choose an element (x) from the array and positive integers (1 \lt y,z \lt x) such that (x=yz) and replace (x) in the array with two elements (y) and (z) (in any order at the original location of (x)). If no such move is possible, the game ends. Once the game ends, if (a) is non-decreasing, then Bob wins. Otherwise, Alice wins. Determine who will win the game if both players play optimally. (^{\text{∗}})(a) is non-decreasing if (a_i\leq a_{i+1}) for all (1\leq i\leq m-1), where (m) is the length of (a). The first line contains an integer (t) ((1 \leq t \leq 10^4)), the number of test cases. The first line of each test case contains an integer (n) ((1 \leq n \leq 10^5)). The second line of each test case contains (n) integers (a_1, a_2, \dots, a_n) ((1 \leq a_i \leq 10^6)). The sum of (n) over all test cases does not exceed (10^5). For each test case, output a line containing "Alice" if Alice wins or "Bob" if Bob wins. The grader is case-sensitive. In the first test case, Alice will win if both players play optimally. In the second test case, Bob can always win no matter what moves Alice makes. In the third test case, Alice can win by replacing (6) with (3) and (2). In the fourth test case, the game ends immediately and Bob wins.

Tutorials

Codeforces Round 1084 (Div. 3) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
364732629 nksammirPL E Feb. 27, 2026, 4:48 p.m. OK C# 13 TESTS 10 218 14745600
364726527 awesohame E Feb. 27, 2026, 4:34 p.m. OK C++17 (GCC 7-32) TESTS 10 46 512000
364726667 sanket_23 E Feb. 27, 2026, 4:34 p.m. OK C++17 (GCC 7-32) TESTS 10 46 1331200
364723122 nbufe2422230033 E Feb. 27, 2026, 4:26 p.m. OK C++17 (GCC 7-32) TESTS 10 46 1536000
364733306 h4rsh.y3mm E Feb. 27, 2026, 4:49 p.m. OK C++17 (GCC 7-32) TESTS 10 46 4096000
364726659 naveengpatil26 E Feb. 27, 2026, 4:34 p.m. OK C++17 (GCC 7-32) TESTS 10 46 4096000
364735984 AGENT-007 E Feb. 27, 2026, 5:03 p.m. OK C++17 (GCC 7-32) TESTS 10 46 6041600
364746907 huyrubik2007 E Feb. 27, 2026, 6:34 p.m. OK C++17 (GCC 7-32) TESTS 10 46 7065600
364758216 prayag2 E Feb. 27, 2026, 8:22 p.m. OK C++17 (GCC 7-32) TESTS 10 62 0
364730194 JackLewicki E Feb. 27, 2026, 4:43 p.m. OK C++17 (GCC 7-32) TESTS 10 62 0
364729143 conductornoah E Feb. 27, 2026, 4:40 p.m. OK C++17 (GCC 7-32) TESTS 10 62 0
364751816 gargpb31 E Feb. 27, 2026, 7:22 p.m. OK C++20 (GCC 13-64) TESTS 10 46 0
364775352 EDCTY E Feb. 28, 2026, 1:48 a.m. OK C++20 (GCC 13-64) TESTS 10 46 512000
364729839 Tarie1 E Feb. 27, 2026, 4:42 p.m. OK C++20 (GCC 13-64) TESTS 10 46 512000
364736676 LTL1541 E Feb. 27, 2026, 5:07 p.m. OK C++20 (GCC 13-64) TESTS 10 46 921600
364728346 Adarsh_agrahari E Feb. 27, 2026, 4:38 p.m. OK C++20 (GCC 13-64) TESTS 10 46 1536000
364725826 Mariom E Feb. 27, 2026, 4:32 p.m. OK C++20 (GCC 13-64) TESTS 10 46 1945600
364730115 shyamalidas E Feb. 27, 2026, 4:42 p.m. OK C++20 (GCC 13-64) TESTS 10 46 3993600
364729851 Shyamalii E Feb. 27, 2026, 4:42 p.m. OK C++20 (GCC 13-64) TESTS 10 46 3993600
364729721 Flowfier E Feb. 27, 2026, 4:42 p.m. OK C++20 (GCC 13-64) TESTS 10 46 3993600
364725039 M.Campver E Feb. 27, 2026, 4:30 p.m. OK C++20 (GCC 13-64) TESTS 10 46 3993600
364729305 Enfios E Feb. 27, 2026, 4:41 p.m. OK C++23 (GCC 14-64, msys2) TESTS 10 31 1126400
364734230 sri_charan_raj_ E Feb. 27, 2026, 4:53 p.m. OK C++23 (GCC 14-64, msys2) TESTS 10 46 0
364722894 siamduetstudent E Feb. 27, 2026, 4:25 p.m. OK C++23 (GCC 14-64, msys2) TESTS 10 46 512000
364737022 Zeyad_Saad E Feb. 27, 2026, 5:09 p.m. OK C++23 (GCC 14-64, msys2) TESTS 10 46 614400
364726048 OmarMoBadr E Feb. 27, 2026, 4:32 p.m. OK C++23 (GCC 14-64, msys2) TESTS 10 46 614400
364779556 thanhnguyxn07 E Feb. 28, 2026, 3:15 a.m. OK C++23 (GCC 14-64, msys2) TESTS 10 46 921600
364747497 NinjaOP77 E Feb. 27, 2026, 6:40 p.m. OK C++23 (GCC 14-64, msys2) TESTS 10 46 921600
364731392 shivr01 E Feb. 27, 2026, 4:46 p.m. OK C++23 (GCC 14-64, msys2) TESTS 10 46 1024000
364722435 Enfios E Feb. 27, 2026, 4:24 p.m. OK C++23 (GCC 14-64, msys2) TESTS 10 46 1126400
364738156 Anoth3r E Feb. 27, 2026, 5:17 p.m. OK C++23 (GCC 14-64, msys2) TESTS 10 46 1331200
364736114 ruban E Feb. 27, 2026, 5:04 p.m. OK FPC TESTS 10 78 89804800
364734950 frag_ E Feb. 27, 2026, 4:56 p.m. OK GNU C11 TESTS 10 62 409600
364733870 indoria_harsh_312005 E Feb. 27, 2026, 4:51 p.m. OK Java 21 TESTS 10 203 3891200
364729816 Devstudent01 E Feb. 27, 2026, 4:42 p.m. OK Java 21 TESTS 10 218 102400
364725135 RuAyu E Feb. 27, 2026, 4:30 p.m. OK Java 21 TESTS 10 218 5120000
364784773 NpHardcore_05 E Feb. 28, 2026, 4:51 a.m. OK Java 21 TESTS 10 218 8908800
364723712 noobcoder58828 E Feb. 27, 2026, 4:27 p.m. OK Java 21 TESTS 10 234 4915200
364732959 YashKhandelwal E Feb. 27, 2026, 4:49 p.m. OK Java 21 TESTS 10 250 3891200
364729747 abdullabohra790 E Feb. 27, 2026, 4:42 p.m. OK Java 21 TESTS 10 250 5939200
364722637 shivam24121 E Feb. 27, 2026, 4:24 p.m. OK Java 21 TESTS 10 265 5529600
364731749 _Abhinavv_ E Feb. 27, 2026, 4:46 p.m. OK Java 21 TESTS 10 265 5734400
364726652 Saravana_Krishnan_J E Feb. 27, 2026, 4:34 p.m. OK Java 21 TESTS 10 265 11878400
364731875 Insha_6 E Feb. 27, 2026, 4:47 p.m. OK Java 8 TESTS 10 140 2764800
364722928 2310080064 E Feb. 27, 2026, 4:25 p.m. OK Java 8 TESTS 10 156 1945600
364723799 letscod2021 E Feb. 27, 2026, 4:27 p.m. OK Java 8 TESTS 10 203 9728000
364776373 chengzijun_de_xiatian E Feb. 28, 2026, 2:10 a.m. OK Java 8 TESTS 10 250 3481600
364781022 abhayrajnegi0416 E Feb. 28, 2026, 3:42 a.m. OK Java 8 TESTS 10 359 0
364726554 hetshah16 E Feb. 27, 2026, 4:34 p.m. OK Java 8 TESTS 10 531 0
364722518 divyansh515 E Feb. 27, 2026, 4:24 p.m. OK Java 8 TESTS 10 593 0
364730473 mehalpandkar E Feb. 27, 2026, 4:43 p.m. OK PyPy 3 TESTS 10 250 13516800
364729952 raghav13aggarwal03 E Feb. 27, 2026, 4:42 p.m. OK PyPy 3 TESTS 10 562 17203200
364725377 kitchau_hcmus E Feb. 27, 2026, 4:31 p.m. OK PyPy 3 TESTS 10 812 10342400
364732962 san1ternma E Feb. 27, 2026, 4:49 p.m. OK PyPy 3-64 TESTS 10 125 19353600
364733282 codingkarlijiye E Feb. 27, 2026, 4:49 p.m. OK PyPy 3-64 TESTS 10 125 20275200
364725914 BennyLaw E Feb. 27, 2026, 4:32 p.m. OK PyPy 3-64 TESTS 10 140 20992000
364742552 LightHouse1 E Feb. 27, 2026, 5:55 p.m. OK PyPy 3-64 TESTS 10 156 21094400
364724974 sshs24083 E Feb. 27, 2026, 4:30 p.m. OK PyPy 3-64 TESTS 10 156 21401600
364773452 gardengnome E Feb. 28, 2026, 1:01 a.m. OK PyPy 3-64 TESTS 10 156 22118400
364736195 sanzenin E Feb. 27, 2026, 5:04 p.m. OK PyPy 3-64 TESTS 10 156 23449600
364729745 nirupnirup8 E Feb. 27, 2026, 4:42 p.m. OK PyPy 3-64 TESTS 10 156 23756800
364741345 alexwice E Feb. 27, 2026, 5:44 p.m. OK PyPy 3-64 TESTS 10 156 26316800
364783138 qyzm123 E Feb. 28, 2026, 4:20 a.m. OK PyPy 3-64 TESTS 10 156 29900800
364785136 sanjanapatel238 E Feb. 28, 2026, 4:56 a.m. OK Python 3 TESTS 10 328 47513600
364726896 Abhi-2006 E Feb. 27, 2026, 4:35 p.m. OK Python 3 TESTS 10 500 22323200
364726005 darkakashihunter E Feb. 27, 2026, 4:32 p.m. OK Python 3 TESTS 10 562 30105600
364725299 aayushsaxena17 E Feb. 27, 2026, 4:31 p.m. OK Python 3 TESTS 10 625 48742400
364731047 the_7g_girl E Feb. 27, 2026, 4:45 p.m. OK Python 3 TESTS 10 625 49254400
364725345 Phoenix_3328 E Feb. 27, 2026, 4:31 p.m. OK Python 3 TESTS 10 640 31641600
364771767 tea_star E Feb. 28, 2026, 12:14 a.m. OK Python 3 TESTS 10 671 48640000
364731507 Vladkutsyk E Feb. 27, 2026, 4:46 p.m. OK Python 3 TESTS 10 703 49152000
364727482 veerabhadrayerram E Feb. 27, 2026, 4:36 p.m. OK Python 3 TESTS 10 734 49152000
364729248 keshavgujrathi E Feb. 27, 2026, 4:40 p.m. OK Python 3 TESTS 10 937 21606400
364727206 hachiko2026 E Feb. 27, 2026, 4:35 p.m. OK Ruby 3 TESTS 10 500 24678400
364749301 macaroni5708 E Feb. 27, 2026, 6:58 p.m. OK Rust 2021 TESTS 10 234 102400
364727397 bqn E Feb. 27, 2026, 4:36 p.m. OK Rust 2021 TESTS 10 296 18636800
364754811 f0rsworN E Feb. 27, 2026, 7:49 p.m. OK Rust 2024 TESTS 10 46 921600
364784134 0x81 E Feb. 28, 2026, 4:40 a.m. OK Rust 2024 TESTS 10 62 1536000
364740801 noodlesiloveyou E Feb. 27, 2026, 5:38 p.m. OK Rust 2024 TESTS 10 250 11776000

remove filters

Back to search problems