IAEPC Preliminary Contest (Codeforces Round 999, Div. 1 + Div. 2)

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
2061 IAEPC Preliminary Contest (Codeforces Round 999, Div. 1 + Div. 2) FINISHED False 10800 39021923 Jan. 20, 2025, 2:35 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 22245 ) A Kevin and Arithmetic PROGRAMMING constructive algorithms greedy math

To train young Kevin's arithmetic skills, his mother devised the following problem. Given (n) integers (a_1, a_2, \ldots, a_n) and a sum (s) initialized to (0), Kevin performs the following operation for (i = 1, 2, \ldots, n) in order: Add (a_i) to (s). If the resulting (s) is even, Kevin earns a point and repeatedly divides (s) by (2) until it becomes odd. Note that Kevin can earn at most one point per operation, regardless of how many divisions he does. Since these divisions are considered more beneficial for Kevin's development, his mother wants to rearrange (a) so that the number of Kevin's total points is maximized. Determine the maximum number of points. Each test contains multiple test cases. The first line contains the number of test cases (t) ((1 \le t \le 500)). The description of the test cases follows. The first line of each test case contains a single integer (n) ((1\leq n \leq 100)) — the number of integers. The second line contains (n) integers (a_1, a_2, \ldots, a_n) ((1\leq a_i \leq 10^9)). For each test case, output one integer — the maximum number of points. In the first test case, the only arrangement of (a) is (1). (s) becomes (1). Kevin earns no points. In the second test case, the only possible arrangement of (a) is (2, 1). (s) becomes (1) and (1) successively. Kevin earns points in both operations. In the third test case, one possible arrangement of (a) is (2, 4, 6). (s) becomes (1), (5), and (11) successively. Kevin earns a point in the first operation.

Tutorials

IAEPC Preliminary Contest (Codeforces Round 999, Div. 1 + Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
302163353 Vulcan- A Jan. 21, 2025, 2:33 a.m. OK C# 10 TESTS 4 77 1536000
302134923 lamboktulus1379 A Jan. 20, 2025, 6:42 p.m. OK C# 10 TESTS 4 93 2662400
302174052 xojvj A Jan. 21, 2025, 4:52 a.m. OK C++17 (GCC 7-32) TESTS 4 30 0
302167069 sacalgo A Jan. 21, 2025, 3:23 a.m. OK C++17 (GCC 7-32) TESTS 4 31 0
302166683 sdrth23 A Jan. 21, 2025, 3:18 a.m. OK C++17 (GCC 7-32) TESTS 4 31 0
302137005 yutabi A Jan. 20, 2025, 6:59 p.m. OK C++17 (GCC 7-32) TESTS 4 31 0
302180688 pratik_2024 A Jan. 21, 2025, 6:04 a.m. OK C++17 (GCC 7-32) TESTS 4 46 0
302179917 hewhocodes A Jan. 21, 2025, 5:57 a.m. OK C++17 (GCC 7-32) TESTS 4 46 0
302179750 k.run007 A Jan. 21, 2025, 5:55 a.m. OK C++17 (GCC 7-32) TESTS 4 46 0
302179375 bhavishya0149 A Jan. 21, 2025, 5:51 a.m. OK C++17 (GCC 7-32) TESTS 4 46 0
302179177 nikunj.mathur.phe22 A Jan. 21, 2025, 5:49 a.m. OK C++17 (GCC 7-32) TESTS 4 46 0
302179068 ayu_264 A Jan. 21, 2025, 5:48 a.m. OK C++17 (GCC 7-32) TESTS 4 46 0
302177975 arindam00121 A Jan. 21, 2025, 5:37 a.m. OK C++20 (GCC 13-64) TESTS 4 30 0
302176633 zobaer_shakib A Jan. 21, 2025, 5:22 a.m. OK C++20 (GCC 13-64) TESTS 4 30 0
302163938 soap_poison A Jan. 21, 2025, 2:41 a.m. OK C++20 (GCC 13-64) TESTS 4 30 0
302147876 mahmoud_aziz A Jan. 20, 2025, 9:04 p.m. OK C++20 (GCC 13-64) TESTS 4 30 0
302136081 abhinavchad1010 A Jan. 20, 2025, 6:50 p.m. OK C++20 (GCC 13-64) TESTS 4 30 36454400
302175179 criticalcoding A Jan. 21, 2025, 5:05 a.m. OK C++20 (GCC 13-64) TESTS 4 31 0
302171668 c0de-Wizard A Jan. 21, 2025, 4:21 a.m. OK C++20 (GCC 13-64) TESTS 4 31 0
302168322 piyushChoudhary A Jan. 21, 2025, 3:38 a.m. OK C++20 (GCC 13-64) TESTS 4 31 0
302167154 Dr.Alfred A Jan. 21, 2025, 3:24 a.m. OK C++20 (GCC 13-64) TESTS 4 31 0
302159617 76ers8 A Jan. 21, 2025, 1:35 a.m. OK C++20 (GCC 13-64) TESTS 4 31 0
302163699 PoetryFactory A Jan. 21, 2025, 2:37 a.m. OK C++23 (GCC 14-64, msys2) TESTS 4 30 0
302169025 Xujj A Jan. 21, 2025, 3:46 a.m. OK C++23 (GCC 14-64, msys2) TESTS 4 30 4300800
302176612 HK_27 A Jan. 21, 2025, 5:21 a.m. OK C++23 (GCC 14-64, msys2) TESTS 4 31 0
302171260 shishi_maru A Jan. 21, 2025, 4:16 a.m. OK C++23 (GCC 14-64, msys2) TESTS 4 31 0
302168894 maddy03 A Jan. 21, 2025, 3:45 a.m. OK C++23 (GCC 14-64, msys2) TESTS 4 31 0
302153786 monostack A Jan. 20, 2025, 11:21 p.m. OK C++23 (GCC 14-64, msys2) TESTS 4 31 0
302142716 maybeAayan A Jan. 20, 2025, 7:55 p.m. OK C++23 (GCC 14-64, msys2) TESTS 4 31 0
302136999 pb2008 A Jan. 20, 2025, 6:59 p.m. OK C++23 (GCC 14-64, msys2) TESTS 4 31 0
302134842 sohailkazi A Jan. 20, 2025, 6:42 p.m. OK C++23 (GCC 14-64, msys2) TESTS 4 31 0
302134789 Masud_Abdullah A Jan. 20, 2025, 6:41 p.m. OK C++23 (GCC 14-64, msys2) TESTS 4 31 0
302174244 noobman01 A Jan. 21, 2025, 4:54 a.m. OK GNU C11 TESTS 4 31 0
302122174 Peter_Hansenberg A Jan. 20, 2025, 5:14 p.m. OK GNU C11 TESTS 4 31 0
302175439 noobman01 A Jan. 21, 2025, 5:08 a.m. OK GNU C11 TESTS 4 31 102400
302168085 Forget_Z A Jan. 21, 2025, 3:35 a.m. OK GNU C11 TESTS 4 31 102400
302122875 rahulkumarsahoo1974 A Jan. 20, 2025, 5:16 p.m. OK GNU C11 TESTS 4 31 102400
302122554 al_shariar_ratul A Jan. 20, 2025, 5:15 p.m. OK GNU C11 TESTS 4 31 102400
302116497 mpchoksi2586 A Jan. 20, 2025, 4:58 p.m. OK GNU C11 TESTS 4 31 102400
302118206 reallyDog123 A Jan. 20, 2025, 5:02 p.m. OK GNU C11 TESTS 4 46 0
302174755 navadeep.sai12 A Jan. 21, 2025, 5 a.m. OK GNU C11 TESTS 4 46 102400
302163412 mazharulhaque94721 A Jan. 21, 2025, 2:34 a.m. OK GNU C11 TESTS 4 46 102400
302137802 iamalizaidi A Jan. 20, 2025, 7:06 p.m. OK Java 21 TESTS 4 202 409600
302134400 jayeshgoel74 A Jan. 20, 2025, 6:39 p.m. OK Java 21 TESTS 4 202 409600
302176678 tekka_ity A Jan. 21, 2025, 5:22 a.m. OK Java 21 TESTS 4 233 204800
302141859 I..am..Vengeance A Jan. 20, 2025, 7:45 p.m. OK Java 21 TESTS 4 233 512000
302170203 vinaykhatri292 A Jan. 21, 2025, 4:02 a.m. OK Java 21 TESTS 4 249 0
302135929 mahathirmoon A Jan. 20, 2025, 6:49 p.m. OK Java 21 TESTS 4 249 0
302147987 singhdevansh024 A Jan. 20, 2025, 9:06 p.m. OK Java 21 TESTS 4 249 204800
302161720 h_maano A Jan. 21, 2025, 2:08 a.m. OK Java 21 TESTS 4 249 716800
302175149 anshu_yadav A Jan. 21, 2025, 5:05 a.m. OK Java 21 TESTS 4 264 1024000
302175944 pawansrinivas10 A Jan. 21, 2025, 5:14 a.m. OK Java 21 TESTS 4 265 512000
302146703 sh3ro A Jan. 20, 2025, 8:45 p.m. OK Java 8 TESTS 4 171 0
302162776 KTpro A Jan. 21, 2025, 2:24 a.m. OK Java 8 TESTS 4 186 0
302148518 kirsh_kkm A Jan. 20, 2025, 9:17 p.m. OK Java 8 TESTS 4 186 0
302172759 ayushojha9998 A Jan. 21, 2025, 4:36 a.m. OK Java 8 TESTS 4 187 0
302143350 shoortanush992005 A Jan. 20, 2025, 8:02 p.m. OK Java 8 TESTS 4 202 0
302117289 bharathannadi63 A Jan. 20, 2025, 5 p.m. OK Java 8 TESTS 4 218 0
302144133 shoortanush992005 A Jan. 20, 2025, 8:11 p.m. OK Java 8 TESTS 4 233 0
302118744 NaiTIK888 A Jan. 20, 2025, 5:04 p.m. OK PyPy 3 TESTS 4 156 5632000
302174475 iamsmoh A Jan. 21, 2025, 4:57 a.m. OK PyPy 3 TESTS 4 171 4403200
302136418 hamster1580 A Jan. 20, 2025, 6:54 p.m. OK PyPy 3 TESTS 4 171 5427200
302172553 VSS203636_ARafayRizwan A Jan. 21, 2025, 4:33 a.m. OK PyPy 3 TESTS 4 202 5836800
302118092 nandini_karnakoti A Jan. 20, 2025, 5:02 p.m. OK PyPy 3 TESTS 4 202 5939200
302153498 juicelord A Jan. 20, 2025, 11:13 p.m. OK PyPy 3-64 TESTS 4 77 2355200
302153167 vitamin_daniels A Jan. 20, 2025, 11:04 p.m. OK PyPy 3-64 TESTS 4 92 1638400
302141151 AnkitRusia A Jan. 20, 2025, 7:38 p.m. OK PyPy 3-64 TESTS 4 92 1638400
302126904 abhijeetbodas2001 A Jan. 20, 2025, 5:29 p.m. OK PyPy 3-64 TESTS 4 92 1945600
302169637 royalgin99 A Jan. 21, 2025, 3:54 a.m. OK PyPy 3-64 TESTS 4 93 2150400
302146247 AyuAnchor A Jan. 20, 2025, 8:38 p.m. OK PyPy 3-64 TESTS 4 93 2150400
302174343 Anav_Agrawal A Jan. 21, 2025, 4:55 a.m. OK PyPy 3-64 TESTS 4 93 2355200
302134620 gardengnome A Jan. 20, 2025, 6:40 p.m. OK PyPy 3-64 TESTS 4 93 2355200
302134200 Doshe A Jan. 20, 2025, 6:38 p.m. OK PyPy 3-64 TESTS 4 93 2457600
302179448 sujan_21 A Jan. 21, 2025, 5:52 a.m. OK PyPy 3-64 TESTS 4 93 2764800
302128733 Akash_gautam25 A Jan. 20, 2025, 5:34 p.m. OK Python 3 TESTS 4 46 0
302159642 sunrayito A Jan. 21, 2025, 1:36 a.m. OK Python 3 TESTS 4 61 0
302176752 panda.BANDANA A Jan. 21, 2025, 5:23 a.m. OK Python 3 TESTS 4 62 0
302174435 _reaper A Jan. 21, 2025, 4:56 a.m. OK Python 3 TESTS 4 62 0
302171005 inbaselvanayyanar A Jan. 21, 2025, 4:13 a.m. OK Python 3 TESTS 4 62 0
302160120 Listar A Jan. 21, 2025, 1:44 a.m. OK Python 3 TESTS 4 62 0
302154339 BubbaHungry A Jan. 20, 2025, 11:41 p.m. OK Python 3 TESTS 4 62 0
302147943 anshul_6273 A Jan. 20, 2025, 9:06 p.m. OK Python 3 TESTS 4 62 0
302120718 gunjan66 A Jan. 20, 2025, 5:09 p.m. OK Python 3 TESTS 4 62 0
302171227 cegaka9972 A Jan. 21, 2025, 4:16 a.m. OK Python 3 TESTS 4 62 409600
302159032 0x81 A Jan. 21, 2025, 1:25 a.m. OK Rust 2021 TESTS 4 46 0
302126824 Thisdaproversionofme A Jan. 20, 2025, 5:29 p.m. OK Rust 2021 TESTS 4 61 0
302146758 vstiff A Jan. 20, 2025, 8:46 p.m. OK Rust 2021 TESTS 4 62 0

remove filters

Back to search problems