Codeforces Global Round 22

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
1738 Codeforces Global Round 22 FINISHED False 9000 67274699 Sept. 30, 2022, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 11289 ) C Even Number Addicts PROGRAMMING dp games greedy math

B'Alice and Bob are playing a game on a sequence a_1, a_2, ... , a_n of length n . They move in turns and Alice moves first. In the turn of each player, he or she should select an integer and remove it from the sequence. The game ends when there is no integer left in the sequence. Alice wins if the sum of her selected integers is even; otherwise, Bob wins. Your task is to determine who will win the game, if both players play optimally. Each test contains multiple test cases. The first line contains an integer t ( 1 <= q t <= q 100 ) -- the number of test cases. The following lines contain the description of each test case. The first line of each test case contains an integer n ( 1 <= q n <= q 100 ), indicating the length of the sequence. The second line of each test case contains n integers a_1, a_2, ... , a_n ( -10^9 <= q a_i <= q 10^9 ), indicating the elements of the sequence. For each test case, output "Alice" (without quotes) if Alice wins and "Bob" (without quotes) otherwise. In the first and second test cases, Alice always selects two odd numbers, so the sum of her selected numbers is always even. Therefore, Alice always wins. In the third test case, Bob has a winning strategy that he always selects a number with the same parity as Alice selects in her last turn. Therefore, Bob always wins. In the fourth test case, Alice always selects two even numbers, so the sum of her selected numbers is always even. Therefore, Alice always wins. '...

Tutorials

Editorial of Codeforces Global Round <strong>22</strong>

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
174204156 GreatLiangpi C Oct. 1, 2022, 5:41 a.m. OK GNU C++14 TESTS 78 15 0
174201205 ankushgoel253 C Oct. 1, 2022, 5:07 a.m. OK GNU C++14 TESTS 78 15 0
174197681 zwu2021016618 C Oct. 1, 2022, 4:20 a.m. OK GNU C++14 TESTS 78 15 0
174194759 achiieeec C Oct. 1, 2022, 3:35 a.m. OK GNU C++14 TESTS 78 15 0
174194326 OriginalAspiration C Oct. 1, 2022, 3:28 a.m. OK GNU C++14 TESTS 78 15 0
174194138 mokuai C Oct. 1, 2022, 3:25 a.m. OK GNU C++14 TESTS 78 15 0
174191277 abs_xyz C Oct. 1, 2022, 2:36 a.m. OK GNU C++14 TESTS 78 15 0
174190501 Neko668 C Oct. 1, 2022, 2:23 a.m. OK GNU C++14 TESTS 78 15 0
174190296 RSLJ C Oct. 1, 2022, 2:19 a.m. OK GNU C++14 TESTS 78 15 0
174190083 ccsu_yukiqwq C Oct. 1, 2022, 2:15 a.m. OK GNU C++14 TESTS 78 15 0
174204821 Tard1grad3 C Oct. 1, 2022, 5:48 a.m. OK GNU C++17 TESTS 78 15 0
174204793 amanmishra_20 C Oct. 1, 2022, 5:48 a.m. OK GNU C++17 TESTS 78 15 0
174204781 jetz C Oct. 1, 2022, 5:48 a.m. OK GNU C++17 TESTS 78 15 0
174203708 aniketrajput25 C Oct. 1, 2022, 5:36 a.m. OK GNU C++17 TESTS 78 15 0
174203173 IoI.dream C Oct. 1, 2022, 5:30 a.m. OK GNU C++17 TESTS 78 15 0
174201720 bkifhr7 C Oct. 1, 2022, 5:13 a.m. OK GNU C++17 TESTS 78 15 0
174201576 thabumi C Oct. 1, 2022, 5:12 a.m. OK GNU C++17 TESTS 78 15 0
174201249 RAY_GARDNER C Oct. 1, 2022, 5:08 a.m. OK GNU C++17 TESTS 78 15 0
174200735 _HiTeSh_ C Oct. 1, 2022, 5:01 a.m. OK GNU C++17 TESTS 78 15 0
174200484 Dpnshu C Oct. 1, 2022, 4:57 a.m. OK GNU C++17 TESTS 78 15 0
174204409 ayushhad7 C Oct. 1, 2022, 5:44 a.m. OK GNU C++17 (64) TESTS 78 15 0
174204069 MisbahUddinTareQ C Oct. 1, 2022, 5:40 a.m. OK GNU C++17 (64) TESTS 78 15 0
174202336 basicecho C Oct. 1, 2022, 5:21 a.m. OK GNU C++17 (64) TESTS 78 15 0
174200987 _mystery_ C Oct. 1, 2022, 5:04 a.m. OK GNU C++17 (64) TESTS 78 15 0
174200747 _mystery_ C Oct. 1, 2022, 5:01 a.m. OK GNU C++17 (64) TESTS 78 15 0
174200684 _mystery_ C Oct. 1, 2022, 5 a.m. OK GNU C++17 (64) TESTS 78 15 0
174200509 _mystery_ C Oct. 1, 2022, 4:58 a.m. OK GNU C++17 (64) TESTS 78 15 0
174199677 UpperMoonZero C Oct. 1, 2022, 4:47 a.m. OK GNU C++17 (64) TESTS 78 15 0
174196903 _mystery_ C Oct. 1, 2022, 4:09 a.m. OK GNU C++17 (64) TESTS 78 15 0
174196631 _mystery_ C Oct. 1, 2022, 4:05 a.m. OK GNU C++17 (64) TESTS 78 15 0
174205609 A__S C Oct. 1, 2022, 5:57 a.m. OK GNU C++20 (64) TESTS 78 15 0
174203330 lucifer2907 C Oct. 1, 2022, 5:32 a.m. OK GNU C++20 (64) TESTS 78 15 0
174202988 Xxuu C Oct. 1, 2022, 5:28 a.m. OK GNU C++20 (64) TESTS 78 15 0
174202983 Artem_Sukharev C Oct. 1, 2022, 5:28 a.m. OK GNU C++20 (64) TESTS 78 15 0
174202582 1011zero C Oct. 1, 2022, 5:24 a.m. OK GNU C++20 (64) TESTS 78 15 0
174202279 DHAKAD_deepak C Oct. 1, 2022, 5:20 a.m. OK GNU C++20 (64) TESTS 78 15 0
174201490 sos_nn_sos C Oct. 1, 2022, 5:10 a.m. OK GNU C++20 (64) TESTS 78 15 0
174201369 Farhan20 C Oct. 1, 2022, 5:09 a.m. OK GNU C++20 (64) TESTS 78 15 0
174201088 Farhan20 C Oct. 1, 2022, 5:05 a.m. OK GNU C++20 (64) TESTS 78 15 0
174200997 Farhan20 C Oct. 1, 2022, 5:04 a.m. OK GNU C++20 (64) TESTS 78 15 0
174168053 koqo C Sept. 30, 2022, 7 p.m. OK Go TESTS 78 31 102400
174152150 shiro C Sept. 30, 2022, 4:56 p.m. OK Go TESTS 78 31 1433600
174187476 enviornment C Oct. 1, 2022, 1:26 a.m. OK Java 11 TESTS 78 187 0
174198672 tony4875 C Oct. 1, 2022, 4:33 a.m. OK Java 11 TESTS 78 202 0
174172415 __Serendipity C Sept. 30, 2022, 7:51 p.m. OK Java 11 TESTS 78 202 0
174162511 mareshkau C Sept. 30, 2022, 6:19 p.m. OK Java 11 TESTS 78 202 0
174149304 kasiru_69 C Sept. 30, 2022, 4:48 p.m. OK Java 11 TESTS 78 202 0
174146745 irachit0702 C Sept. 30, 2022, 4:41 p.m. OK Java 11 TESTS 78 202 0
174149010 dzhi C Sept. 30, 2022, 4:48 p.m. OK Java 11 TESTS 78 218 0
174194144 minibin C Oct. 1, 2022, 3:25 a.m. OK Java 11 TESTS 78 218 102400
174197880 PriyaAnu C Oct. 1, 2022, 4:23 a.m. OK Java 11 TESTS 78 233 102400
174181479 ushikawa C Sept. 30, 2022, 10:38 p.m. OK Java 11 TESTS 78 249 0
174176252 freehandle C Sept. 30, 2022, 8:48 p.m. OK Java 17 TESTS 78 233 1126400
174153484 Mamimi C Sept. 30, 2022, 5 p.m. OK Java 17 TESTS 78 233 1126400
174152616 crookcoder C Sept. 30, 2022, 4:58 p.m. OK Java 17 TESTS 78 248 921600
174200315 KARTIKPATEL C Oct. 1, 2022, 4:55 a.m. OK Java 17 TESTS 78 249 1536000
174146914 mohdshoaib_3lin1 C Sept. 30, 2022, 4:42 p.m. OK Java 17 TESTS 78 265 1228800
174162378 Eslam_Ahmed C Sept. 30, 2022, 6:18 p.m. OK Java 17 TESTS 78 343 1228800
174201789 priyaroy3370 C Oct. 1, 2022, 5:14 a.m. OK Java 8 TESTS 78 93 0
174202207 amit_roy C Oct. 1, 2022, 5:19 a.m. OK Java 8 TESTS 78 109 0
174172561 Virendra115 C Sept. 30, 2022, 7:53 p.m. OK Java 8 TESTS 78 109 0
174165835 NerfThis C Sept. 30, 2022, 6:41 p.m. OK Java 8 TESTS 78 109 0
174174590 ashanksingh1997 C Sept. 30, 2022, 8:22 p.m. OK Java 8 TESTS 78 124 0
174149631 Unrated_Pritam C Sept. 30, 2022, 4:49 p.m. OK Java 8 TESTS 78 124 0
174151948 vaibhav_1710 C Sept. 30, 2022, 4:56 p.m. OK Java 8 TESTS 78 140 0
174148898 sachinjaiswal C Sept. 30, 2022, 4:47 p.m. OK Java 8 TESTS 78 920 921600
174162845 arvindf232 C Sept. 30, 2022, 6:20 p.m. OK Kotlin 1.6 TESTS 78 233 1228800
174148717 AlgoTurtle C Sept. 30, 2022, 4:47 p.m. OK Mono C# TESTS 78 46 716800
174155491 Tor_250 C Sept. 30, 2022, 5:04 p.m. OK MS C++ 2017 TESTS 78 30 0
174195995 vivek_zadokar C Oct. 1, 2022, 3:55 a.m. OK PyPy 3 TESTS 78 93 2252800
174195941 Zordovolin_99 C Oct. 1, 2022, 3:54 a.m. OK PyPy 3 TESTS 78 93 2252800
174151006 el_2000030682 C Sept. 30, 2022, 4:53 p.m. OK PyPy 3 TESTS 78 109 2560000
174148956 Abhyudai_Mishra_2024 C Sept. 30, 2022, 4:48 p.m. OK PyPy 3 TESTS 78 109 2560000
174149151 helmut_schmacker C Sept. 30, 2022, 4:48 p.m. OK PyPy 3 TESTS 78 109 2662400
174152760 bewareofme C Sept. 30, 2022, 4:58 p.m. OK PyPy 3 TESTS 78 124 2560000
174148947 neel0086 C Sept. 30, 2022, 4:47 p.m. OK PyPy 3 TESTS 78 140 3686400
174201512 Mrs.Zhao C Oct. 1, 2022, 5:11 a.m. OK PyPy 3 TESTS 78 218 12185600
174177111 tcltk C Sept. 30, 2022, 9:02 p.m. OK PyPy 3 TESTS 78 358 11366400
174162652 AyuAnchor C Sept. 30, 2022, 6:19 p.m. OK PyPy 3-64 TESTS 78 77 2252800
174168361 kikjeck C Sept. 30, 2022, 7:03 p.m. OK PyPy 3-64 TESTS 78 77 2969600
174166223 Aksnov C Sept. 30, 2022, 6:44 p.m. OK PyPy 3-64 TESTS 78 77 3584000
174151890 unknown91 C Sept. 30, 2022, 4:56 p.m. OK PyPy 3-64 TESTS 78 93 4198400
174151355 rakib_ C Sept. 30, 2022, 4:54 p.m. OK PyPy 3-64 TESTS 78 93 5427200
174153309 aditya_1292 C Sept. 30, 2022, 4:59 p.m. OK PyPy 3-64 TESTS 78 108 4403200
174156057 niku_00 C Sept. 30, 2022, 5:04 p.m. OK PyPy 3-64 TESTS 78 108 5427200
174153351 2010040121_akshitha C Sept. 30, 2022, 4:59 p.m. OK PyPy 3-64 TESTS 78 108 5427200
174148658 Noclue C Sept. 30, 2022, 4:47 p.m. OK PyPy 3-64 TESTS 78 108 5427200
174147392 manoharkarthik C Sept. 30, 2022, 4:43 p.m. OK PyPy 3-64 TESTS 78 108 5427200
174198607 IronMan_P0 C Oct. 1, 2022, 4:32 a.m. OK Python 3 TESTS 78 46 0
174195105 2010030206 C Oct. 1, 2022, 3:40 a.m. OK Python 3 TESTS 78 46 0
174177033 MrTwinkleSharma C Sept. 30, 2022, 9:01 p.m. OK Python 3 TESTS 78 46 0
174176022 _Ambuj123 C Sept. 30, 2022, 8:44 p.m. OK Python 3 TESTS 78 46 0
174156012 utrpatzer C Sept. 30, 2022, 5:04 p.m. OK Python 3 TESTS 78 46 0
174154919 yghygh123 C Sept. 30, 2022, 5:03 p.m. OK Python 3 TESTS 78 46 0
174154205 mahendar_1234 C Sept. 30, 2022, 5:01 p.m. OK Python 3 TESTS 78 46 0
174153621 shreyash2396panchal C Sept. 30, 2022, 5 p.m. OK Python 3 TESTS 78 46 0
174152536 2010030422 C Sept. 30, 2022, 4:57 p.m. OK Python 3 TESTS 78 46 0
174150960 ejjuaswitha C Sept. 30, 2022, 4:53 p.m. OK Python 3 TESTS 78 46 0

remove filters

Back to search problems