Codeforces Round 929 (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
1933 Codeforces Round 929 (Div. 3) FINISHED False 8100 28135463 Feb. 27, 2024, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 33527 ) B Turtle Math: Fast Three Task PROGRAMMING implementation number theory

B'You are given an array a_1, a_2, ldots, a_n . In one move, you can perform either of the following two operations: You can perform any number of moves. If the current array becomes empty, then no more moves can be made. Your task is to find the minimum number of moves required to make the sum of the elements of the array a divisible by 3 . It is possible that you may need 0 moves. Note that the sum of the elements of an empty array (an array of length 0 ) is equal to 0 . The first line of the input contains a single integer t ( 1 <= t <= 10^4 ) -- the number of test cases. The first line of each test case contains a single integer n ( 1 <= n <= 10^5 ). The second line of each test case contains n integers a_1, a_2, ldots, a_n ( 1 <= a_i <= 10^4 ). The sum of n over all test cases does not exceed 2 cdot 10^5 . For each test case, output a single integer: the minimum number of moves. In the first test case, initially the array a = [2, 2, 5, 4] . One of the optimal ways to make moves is: In the second test case, initially, the sum of the array is 1+3+2 = 6 , which is divisible by 3 . Therefore, no moves are required. Hence, the answer is 0 . In the fourth test case, initially, the sum of the array is 1 , which is not divisible by 3 . By removing its only element, you will get an empty array, so its sum is 0 . Hence, the answer is 1 . '...

Tutorials

Codeforces Round 929 (Div. 3) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
248730989 threexsix B Feb. 28, 2024, 10:59 a.m. OK C# 10 TESTS 7 62 10342400
248751518 justunderdog B Feb. 28, 2024, 1:07 p.m. OK C# 10 TESTS 7 77 10342400
248835254 Taj025 B Feb. 29, 2024, 5:01 a.m. OK C# 8 TESTS 7 155 13721600
248749348 bkifhr7 B Feb. 28, 2024, 12:54 p.m. OK Clang++17 Diagnostics TESTS 7 93 0
248792737 AbdulRahman_Salah B Feb. 28, 2024, 6:02 p.m. OK Clang++17 Diagnostics TESTS 7 686 1638400
248747144 Tchai B Feb. 28, 2024, 12:41 p.m. OK Clang++17 Diagnostics TESTS 7 717 0
248755535 duckherder B Feb. 28, 2024, 1:31 p.m. OK Clang++17 Diagnostics TESTS 7 717 1024000
248838842 hongyanchangfei B Feb. 29, 2024, 5:46 a.m. OK Clang++17 Diagnostics TESTS 7 732 4300800
248725819 BuriBuriZymon B Feb. 28, 2024, 10:20 a.m. OK Clang++17 Diagnostics TESTS 7 733 0
248745391 vjudge.3 B Feb. 28, 2024, 12:30 p.m. OK Clang++20 Diagnostics TESTS 7 77 0
248749995 vjudge.5 B Feb. 28, 2024, 12:58 p.m. OK Clang++20 Diagnostics TESTS 7 78 0
248749314 vjudge.9 B Feb. 28, 2024, 12:54 p.m. OK Clang++20 Diagnostics TESTS 7 78 0
248748346 bkifhr7 B Feb. 28, 2024, 12:49 p.m. OK Clang++20 Diagnostics TESTS 7 78 0
248745906 vjudge3 B Feb. 28, 2024, 12:33 p.m. OK Clang++20 Diagnostics TESTS 7 670 512000
248744486 vjudge3 B Feb. 28, 2024, 12:24 p.m. OK Clang++20 Diagnostics TESTS 7 701 512000
248752765 suranjan010101 B Feb. 28, 2024, 1:15 p.m. OK Clang++20 Diagnostics TESTS 7 717 409600
248730665 blue_30 B Feb. 28, 2024, 10:57 a.m. OK Clang++20 Diagnostics TESTS 7 748 0
248772502 eminem18753 B Feb. 28, 2024, 3:31 p.m. OK Clang++20 Diagnostics TESTS 7 748 409600
248818339 vjudge.10 B Feb. 28, 2024, 11:05 p.m. OK Clang++20 Diagnostics TESTS 7 763 15360000
248821632 khasevaolhp B Feb. 29, 2024, 12:32 a.m. OK FPC TESTS 7 61 0
248798760 Vinuthna.G B Feb. 28, 2024, 6:54 p.m. OK GNU C11 TESTS 7 46 409600
248783444 MooNaz B Feb. 28, 2024, 4:52 p.m. OK GNU C11 TESTS 7 46 614400
248746152 muntasirmuhammad555 B Feb. 28, 2024, 12:35 p.m. OK GNU C11 TESTS 7 46 1024000
248816179 mdkhaledmhamud220 B Feb. 28, 2024, 10:18 p.m. OK GNU C11 TESTS 7 61 307200
248760742 DDDG B Feb. 28, 2024, 2:05 p.m. OK GNU C11 TESTS 7 61 307200
248728848 pmjadhav B Feb. 28, 2024, 10:44 a.m. OK GNU C11 TESTS 7 61 614400
248763752 Jannatul97500 B Feb. 28, 2024, 2:25 p.m. OK GNU C11 TESTS 7 61 614400
248690818 Itchi B Feb. 28, 2024, 4:45 a.m. OK GNU C11 TESTS 7 61 819200
248820182 tesnim.khaldi B Feb. 28, 2024, 11:51 p.m. OK GNU C11 TESTS 7 62 409600
248824208 Manvith2115 B Feb. 29, 2024, 1:36 a.m. OK GNU C11 TESTS 7 62 614400
248728362 Mrtao323 B Feb. 28, 2024, 10:40 a.m. OK GNU C++17 TESTS 7 31 0
248685887 sheep__sun B Feb. 28, 2024, 3:37 a.m. OK GNU C++17 TESTS 7 31 409600
248740734 MASRAFI221 B Feb. 28, 2024, 12:02 p.m. OK GNU C++17 TESTS 7 31 409600
248726182 Mkswll B Feb. 28, 2024, 10:23 a.m. OK GNU C++17 TESTS 7 31 819200
248839138 Graffolyon B Feb. 29, 2024, 5:50 a.m. OK GNU C++17 TESTS 7 46 0
248835553 t_a_n_m_o_y B Feb. 29, 2024, 5:05 a.m. OK GNU C++17 TESTS 7 46 0
248833780 tbzard B Feb. 29, 2024, 4:41 a.m. OK GNU C++17 TESTS 7 46 0
248828333 SLZSM B Feb. 29, 2024, 3:07 a.m. OK GNU C++17 TESTS 7 46 0
248823772 JUSTINLEECEO B Feb. 29, 2024, 1:26 a.m. OK GNU C++17 TESTS 7 46 0
248835824 Newplayers12 B Feb. 29, 2024, 5:09 a.m. OK GNU C++17 TESTS 7 46 0
248690080 Xenon- B Feb. 28, 2024, 4:36 a.m. OK GNU C++17 (64) TESTS 7 30 0
248754400 Memset_Lee B Feb. 28, 2024, 1:25 p.m. OK GNU C++17 (64) TESTS 7 30 0
248691175 KXD04 B Feb. 28, 2024, 4:49 a.m. OK GNU C++17 (64) TESTS 7 30 0
248756207 RGB_ICPC3 B Feb. 28, 2024, 1:36 p.m. OK GNU C++17 (64) TESTS 7 30 409600
248757026 SiberianKhatru B Feb. 28, 2024, 1:41 p.m. OK GNU C++17 (64) TESTS 7 30 3993600
248756339 mike_frank11 B Feb. 28, 2024, 1:36 p.m. OK GNU C++17 (64) TESTS 7 30 7987200
248737137 rishit3234 B Feb. 28, 2024, 11:40 a.m. OK GNU C++17 (64) TESTS 7 31 0
248767563 yaoye222 B Feb. 28, 2024, 2:53 p.m. OK GNU C++17 (64) TESTS 7 31 0
248782228 opbot_xd B Feb. 28, 2024, 4:43 p.m. OK GNU C++17 (64) TESTS 7 31 0
248825681 2c2048d2 B Feb. 29, 2024, 2:12 a.m. OK GNU C++17 (64) TESTS 7 31 0
248724547 cotato B Feb. 28, 2024, 10:10 a.m. OK GNU C++20 (64) TESTS 7 15 0
248723776 Beblet B Feb. 28, 2024, 10:04 a.m. OK GNU C++20 (64) TESTS 7 15 0
248722061 cyan_cloud B Feb. 28, 2024, 9:51 a.m. OK GNU C++20 (64) TESTS 7 15 0
248731308 S_Mim_ B Feb. 28, 2024, 11:01 a.m. OK GNU C++20 (64) TESTS 7 15 0
248736870 Bamb B Feb. 28, 2024, 11:38 a.m. OK GNU C++20 (64) TESTS 7 15 0
248757376 ZaRobot10 B Feb. 28, 2024, 1:43 p.m. OK GNU C++20 (64) TESTS 7 15 0
248750409 RGB_ICPC8 B Feb. 28, 2024, 1:01 p.m. OK GNU C++20 (64) TESTS 7 15 409600
248792931 SaddamHosen B Feb. 28, 2024, 6:04 p.m. OK GNU C++20 (64) TESTS 7 15 409600
248793290 silencer1234 B Feb. 28, 2024, 6:07 p.m. OK GNU C++20 (64) TESTS 7 15 409600
248822379 Skt_Kun B Feb. 29, 2024, 12:52 a.m. OK GNU C++20 (64) TESTS 7 15 409600
248714229 Rememorio B Feb. 28, 2024, 8:50 a.m. OK Go TESTS 7 62 2662400
248778797 trurgot B Feb. 28, 2024, 4:18 p.m. OK Go TESTS 7 77 1024000
248731722 peng-zhang B Feb. 28, 2024, 11:04 a.m. OK Go TESTS 7 78 1024000
248714352 jiangxiaoju B Feb. 28, 2024, 8:50 a.m. OK Go TESTS 7 78 1024000
248792381 Nekronishe B Feb. 28, 2024, 6 p.m. OK Java 21 TESTS 7 233 0
248839472 sid234890 B Feb. 29, 2024, 5:54 a.m. OK Java 21 TESTS 7 233 0
248715739 fightingxjz B Feb. 28, 2024, 9 a.m. OK Java 21 TESTS 7 233 0
248761033 BishtCoder B Feb. 28, 2024, 2:07 p.m. OK Java 21 TESTS 7 264 0
248833349 Dipeshgund B Feb. 29, 2024, 4:35 a.m. OK Java 21 TESTS 7 265 0
248742827 cpp10 B Feb. 28, 2024, 12:14 p.m. OK Java 21 TESTS 7 280 0
248715911 xiaobaiyayaya B Feb. 28, 2024, 9:02 a.m. OK Java 21 TESTS 7 280 0
248765333 xin2002 B Feb. 28, 2024, 2:36 p.m. OK Java 21 TESTS 7 295 15872000
248742631 cpp10 B Feb. 28, 2024, 12:13 p.m. OK Java 21 TESTS 7 296 0
248691074 Nick B Feb. 28, 2024, 4:48 a.m. OK Java 21 TESTS 7 296 0
248752145 Mr.Numerator_007 B Feb. 28, 2024, 1:11 p.m. OK Java 8 TESTS 7 93 0
248825226 Q_R_Y B Feb. 29, 2024, 2:03 a.m. OK Java 8 TESTS 7 124 0
248768854 sajibcuet09 B Feb. 28, 2024, 3:03 p.m. OK Java 8 TESTS 7 124 0
248766178 yellowflash B Feb. 28, 2024, 2:42 p.m. OK Java 8 TESTS 7 124 0
248684321 samuelX159 B Feb. 28, 2024, 3:10 a.m. OK Java 8 TESTS 7 124 0
248690973 51Hz B Feb. 28, 2024, 4:47 a.m. OK Java 8 TESTS 7 139 1126400
248839540 too_depressed B Feb. 29, 2024, 5:55 a.m. OK Java 8 TESTS 7 140 0
248737381 ygming B Feb. 28, 2024, 11:41 a.m. OK Java 8 TESTS 7 140 0
248818822 mada-mada B Feb. 28, 2024, 11:16 p.m. OK Java 8 TESTS 7 155 1126400
248725458 yashvardhan3 B Feb. 28, 2024, 10:17 a.m. OK Java 8 TESTS 7 170 0
248819760 omarsaifeldeen2000 B Feb. 28, 2024, 11:40 p.m. OK JavaScript TESTS 7 171 33075200
248815350 Piashy B Feb. 28, 2024, 10:04 p.m. OK MS C++ 2017 TESTS 7 124 409600
248809991 Gadi B Feb. 28, 2024, 8:52 p.m. OK MS C++ 2017 TESTS 7 124 409600
248735030 ammar007 B Feb. 28, 2024, 11:26 a.m. OK MS C++ 2017 TESTS 7 124 409600
248774462 TawfekHesham B Feb. 28, 2024, 3:46 p.m. OK MS C++ 2017 TESTS 7 139 2355200
248752879 Lehotai_Gergely B Feb. 28, 2024, 1:16 p.m. OK MS C++ 2017 TESTS 7 140 409600
248724729 juanjuanmao B Feb. 28, 2024, 10:12 a.m. OK MS C++ 2017 TESTS 7 140 409600
248685643 Eagle2.00 B Feb. 28, 2024, 3:34 a.m. OK MS C++ 2017 TESTS 7 140 409600
248789798 KasD B Feb. 28, 2024, 5:41 p.m. OK MS C++ 2017 TESTS 7 155 409600
248688951 tikam B Feb. 28, 2024, 4:22 a.m. OK MS C++ 2017 TESTS 7 156 409600
248816646 vjudge.9 B Feb. 28, 2024, 10:28 p.m. OK MS C++ 2017 TESTS 7 171 204800
248764122 maxgotech B Feb. 28, 2024, 2:27 p.m. OK Node.js TESTS 7 436 15257600
248690677 katomasao B Feb. 28, 2024, 4:43 a.m. OK Perl TESTS 7 124 2560000
248685652 xiao-fang B Feb. 28, 2024, 3:34 a.m. OK PyPy 3 TESTS 7 343 10752000
248831773 228r1a0468 B Feb. 29, 2024, 4:10 a.m. OK PyPy 3 TESTS 7 343 13414400
248742543 coder_11 B Feb. 28, 2024, 12:13 p.m. OK PyPy 3 TESTS 7 358 13516800
248718631 Yorik123 B Feb. 28, 2024, 9:22 a.m. OK PyPy 3 TESTS 7 389 13516800
248762348 AnonY_MouS_CodeR B Feb. 28, 2024, 2:16 p.m. OK PyPy 3 TESTS 7 390 14336000
248764387 Elmurat B Feb. 28, 2024, 2:29 p.m. OK PyPy 3 TESTS 7 405 13414400
248756715 yuktaxxx B Feb. 28, 2024, 1:39 p.m. OK PyPy 3 TESTS 7 405 13516800
248720221 barbaadbachchi B Feb. 28, 2024, 9:36 a.m. OK PyPy 3 TESTS 7 420 13516800
248750765 gerogeVT B Feb. 28, 2024, 1:03 p.m. OK PyPy 3 TESTS 7 420 14540800
248718156 sevonchik B Feb. 28, 2024, 9:18 a.m. OK PyPy 3 TESTS 7 467 13824000
248690487 DarkTemplarDrop B Feb. 28, 2024, 4:41 a.m. OK PyPy 3-64 TESTS 7 93 20275200
248732827 iedfa B Feb. 28, 2024, 11:13 a.m. OK PyPy 3-64 TESTS 7 109 17920000
248832142 Taymyr B Feb. 29, 2024, 4:16 a.m. OK PyPy 3-64 TESTS 7 109 18022400
248790397 AntonKorch B Feb. 28, 2024, 5:45 p.m. OK PyPy 3-64 TESTS 7 109 18432000
248767462 N1664 B Feb. 28, 2024, 2:52 p.m. OK PyPy 3-64 TESTS 7 124 15052800
248791554 nife B Feb. 28, 2024, 5:54 p.m. OK PyPy 3-64 TESTS 7 124 17510400
248816935 _aadiupadhyay_ B Feb. 28, 2024, 10:33 p.m. OK PyPy 3-64 TESTS 7 124 19660800
248689081 Youarenotgood B Feb. 28, 2024, 4:24 a.m. OK PyPy 3-64 TESTS 7 139 17305600
248764319 Mohamed_Hamed B Feb. 28, 2024, 2:29 p.m. OK PyPy 3-64 TESTS 7 139 17612800
248817678 am2503 B Feb. 28, 2024, 10:48 p.m. OK PyPy 3-64 TESTS 7 140 18636800
248762791 boogeymanJW B Feb. 28, 2024, 2:19 p.m. OK Python 2 TESTS 7 171 9011200
248782953 varun9901 B Feb. 28, 2024, 4:48 p.m. OK Python 3 TESTS 7 93 13004800
248731393 Gegedosh MakShon kapopenko B Feb. 28, 2024, 11:02 a.m. OK Python 3 TESTS 7 93 13004800
248732049 Charles_LHN B Feb. 28, 2024, 11:07 a.m. OK Python 3 TESTS 7 108 19251200
248759865 Ankit2406 B Feb. 28, 2024, 1:59 p.m. OK Python 3 TESTS 7 109 18636800
248741136 cheking B Feb. 28, 2024, 12:04 p.m. OK Python 3 TESTS 7 109 18636800
248714344 Allegator B Feb. 28, 2024, 8:50 a.m. OK Python 3 TESTS 7 124 13414400
248813099 engjonah B Feb. 28, 2024, 9:30 p.m. OK Python 3 TESTS 7 124 13824000
248826841 etale B Feb. 29, 2024, 2:34 a.m. OK Python 3 TESTS 7 124 14540800
248810053 M.Abdalkreem B Feb. 28, 2024, 8:53 p.m. OK Python 3 TESTS 7 124 14540800
248688838 sumedhgosavi05 B Feb. 28, 2024, 4:20 a.m. OK Python 3 TESTS 7 124 15052800
248809695 Lukiko B Feb. 28, 2024, 8:48 p.m. OK Rust 2021 TESTS 7 77 4096000
248687139 snamy520 B Feb. 28, 2024, 3:55 a.m. OK Rust 2021 TESTS 7 93 7065600

remove filters

Back to search problems