Codeforces Round 909 (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
1899 Codeforces Round 909 (Div. 3) FINISHED False 8100 36948263 Nov. 17, 2023, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 22064 ) B 250 Thousand Tons of TNT PROGRAMMING brute force implementation number theory

B"Alex is participating in the filming of another video of BrMeast, and BrMeast asked Alex to prepare 250 thousand tons of TNT, but Alex didn't hear him well, so he prepared n boxes and arranged them in a row waiting for trucks. The i -th box from the left weighs a_i tons. All trucks that Alex is going to use hold the same number of boxes, denoted by k . Loading happens the following way: Upon loading is completed, each truck must have exactly k boxes. In other words, if at some point it is not possible to load exactly k boxes into the truck, then the loading option with that k is not possible. Alex hates justice, so he wants the maximum absolute difference between the total weights of two trucks to be as great as possible. If there is only one truck, this value is 0 . Alex has quite a lot of connections, so for every 1 <= q k <= q n , he can find a company such that each of its trucks can hold exactly k boxes. Print the maximum absolute difference between the total weights of any two trucks. The first line contains one integer t ( 1 <= q t <= q 10^4 ) -- the number of test cases. The first line of each test case contains one integer n ( 1 <= q n <= q 150 ,000 ) -- the number of boxes. The second line contains n integers a_1, a_2, ... , a_n ( 1 <= q a_i <= q 10^9 ) -- the weights of the boxes. It is guaranteed that the sum of n for all test cases does not exceed 150 ,000 . For each test case, print a single integer -- the answer to the problem. In the first case, we should pick two trucks, so the first one will have only the first box, and the second one will have only the second box. In the second case, we should pick six trucks, so the maximum will be 10 , the minimum will be 1 , and the answer is 10 - 1 = 9 . In the third case, for any possible k , the trucks will have the same total weight of boxes, so the answer is 0 ."...

Tutorials

Разбор Codeforces Round 909 (Div. 3)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
233218146 M.Abdalkreem B Nov. 17, 2023, 7:52 p.m. OK C# 10 TESTS 8 93 13721600
233241704 Khusniddin2002 B Nov. 18, 2023, 4:16 a.m. OK C# 10 TESTS 8 124 12800000
233215458 M.Abdalkreem B Nov. 17, 2023, 7:19 p.m. OK C# 10 TESTS 8 139 13721600
233209089 kokora B Nov. 17, 2023, 6:14 p.m. OK C# 10 TESTS 8 311 18329600
233227145 bluemegane B Nov. 17, 2023, 10:31 p.m. OK C# 8 TESTS 8 140 13004800
233237366 Ling_yun_xing_zhe B Nov. 18, 2023, 3:07 a.m. OK Clang++20 Diagnostics TESTS 8 685 16179200
233237312 Ling_yun_xing_zhe B Nov. 18, 2023, 3:06 a.m. OK Clang++20 Diagnostics TESTS 8 748 16179200
233236672 Yourxingiegie B Nov. 18, 2023, 2:55 a.m. OK Clang++20 Diagnostics TESTS 8 889 614400
233225606 sasapuappalanaidu B Nov. 17, 2023, 9:53 p.m. OK Clang++20 Diagnostics TESTS 8 889 1228800
233240377 Tom201314 B Nov. 18, 2023, 3:55 a.m. OK Clang++20 Diagnostics TESTS 8 1247 1331200
233204614 Gassa B Nov. 17, 2023, 5:38 p.m. OK D TESTS 8 171 6348800
233206777 Gassa B Nov. 17, 2023, 5:55 p.m. OK D TESTS 8 390 13721600
233205253 Gassa B Nov. 17, 2023, 5:44 p.m. OK D TESTS 8 405 13721600
233206955 Gassa B Nov. 17, 2023, 5:57 p.m. OK D TESTS 8 420 13721600
233206621 Gassa B Nov. 17, 2023, 5:54 p.m. OK D TESTS 8 420 13721600
233202183 c0derro B Nov. 17, 2023, 5:22 p.m. OK GNU C11 TESTS 8 46 1740800
233192974 sharprang B Nov. 17, 2023, 4:46 p.m. OK GNU C11 TESTS 8 77 3174400
233211914 Likhit_Bhogadi B Nov. 17, 2023, 6:41 p.m. OK GNU C11 TESTS 8 78 3584000
233218769 i-AM-DEVIL B Nov. 17, 2023, 8 p.m. OK GNU C11 TESTS 8 78 3584000
233200270 52ducbanh B Nov. 17, 2023, 5:11 p.m. OK GNU C++14 TESTS 8 31 4812800
233211101 omeganot B Nov. 17, 2023, 6:32 p.m. OK GNU C++14 TESTS 8 46 614400
233245140 tzs_21 B Nov. 18, 2023, 5:02 a.m. OK GNU C++14 TESTS 8 46 614400
233249349 fzyz2020 B Nov. 18, 2023, 5:49 a.m. OK GNU C++14 TESTS 8 46 614400
233243113 tzs_21 B Nov. 18, 2023, 4:36 a.m. OK GNU C++14 TESTS 8 46 614400
233205720 jayshil_n_b B Nov. 17, 2023, 5:47 p.m. OK GNU C++14 TESTS 8 46 1228800
233237439 Lyhhhh B Nov. 18, 2023, 3:08 a.m. OK GNU C++14 TESTS 8 46 1228800
233230519 Omarhamdyi B Nov. 18, 2023, 12:23 a.m. OK GNU C++14 TESTS 8 46 1228800
233230505 Omarhamdyi B Nov. 18, 2023, 12:23 a.m. OK GNU C++14 TESTS 8 46 1228800
233213166 w7d3laZerooo B Nov. 17, 2023, 6:54 p.m. OK GNU C++14 TESTS 8 46 1228800
233200210 mazharul0 B Nov. 17, 2023, 5:11 p.m. OK GNU C++17 TESTS 8 31 1126400
233233178 JAKIAKUCSE B Nov. 18, 2023, 1:43 a.m. OK GNU C++17 TESTS 8 31 2355200
233207914 skyEmperor_KA B Nov. 17, 2023, 6:04 p.m. OK GNU C++17 TESTS 8 31 2355200
233199659 immdjiji B Nov. 17, 2023, 5:08 p.m. OK GNU C++17 TESTS 8 31 2457600
233198062 Student_7 B Nov. 17, 2023, 5 p.m. OK GNU C++17 TESTS 8 31 3379200
233206104 AKStream B Nov. 17, 2023, 5:50 p.m. OK GNU C++17 TESTS 8 46 614400
233248059 xudaoling B Nov. 18, 2023, 5:35 a.m. OK GNU C++17 TESTS 8 46 614400
233246528 iaadi8 B Nov. 18, 2023, 5:18 a.m. OK GNU C++17 TESTS 8 46 614400
233230534 LeonardSchulman B Nov. 18, 2023, 12:24 a.m. OK GNU C++17 TESTS 8 46 614400
233213855 Harshgupta2003 B Nov. 17, 2023, 7:01 p.m. OK GNU C++17 TESTS 8 46 614400
233192523 vrehg B Nov. 17, 2023, 4:45 p.m. OK GNU C++17 (64) TESTS 8 30 16076800
233217009 startrek4 B Nov. 17, 2023, 7:38 p.m. OK GNU C++17 (64) TESTS 8 31 1228800
233194569 why_nt B Nov. 17, 2023, 4:48 p.m. OK GNU C++17 (64) TESTS 8 31 1228800
233231826 Once_I_Liked_AGirl B Nov. 18, 2023, 1:09 a.m. OK GNU C++17 (64) TESTS 8 31 1228800
233234429 Mrlaolu B Nov. 18, 2023, 2:12 a.m. OK GNU C++17 (64) TESTS 8 31 1228800
233209251 HelmOptimum B Nov. 17, 2023, 6:16 p.m. OK GNU C++17 (64) TESTS 8 31 1228800
233201352 _Visitor B Nov. 17, 2023, 5:17 p.m. OK GNU C++17 (64) TESTS 8 31 1228800
233230483 CrazyAboutMe B Nov. 18, 2023, 12:22 a.m. OK GNU C++17 (64) TESTS 8 31 1638400
233241126 Dynamic_Pigeon B Nov. 18, 2023, 4:08 a.m. OK GNU C++17 (64) TESTS 8 31 2355200
233241488 imsuck12 B Nov. 18, 2023, 4:13 a.m. OK GNU C++17 (64) TESTS 8 31 2355200
233207868 sayedmostafa B Nov. 17, 2023, 6:04 p.m. OK GNU C++20 (64) TESTS 8 15 1228800
233233555 TienMinh B Nov. 18, 2023, 1:52 a.m. OK GNU C++20 (64) TESTS 8 15 1228800
233231522 hzh2004 B Nov. 18, 2023, 12:58 a.m. OK GNU C++20 (64) TESTS 8 15 1228800
233231470 wushenglinglu B Nov. 18, 2023, 12:56 a.m. OK GNU C++20 (64) TESTS 8 15 1228800
233224072 Saquif_Sohol B Nov. 17, 2023, 9:22 p.m. OK GNU C++20 (64) TESTS 8 15 1228800
233223417 ibrahim_mostafa8545 B Nov. 17, 2023, 9:12 p.m. OK GNU C++20 (64) TESTS 8 15 1228800
233214804 jvdss12 B Nov. 17, 2023, 7:11 p.m. OK GNU C++20 (64) TESTS 8 15 1228800
233214715 jvdss12 B Nov. 17, 2023, 7:10 p.m. OK GNU C++20 (64) TESTS 8 15 1228800
233213567 ayush7_20 B Nov. 17, 2023, 6:57 p.m. OK GNU C++20 (64) TESTS 8 15 1228800
233200956 puspendra_09 B Nov. 17, 2023, 5:15 p.m. OK GNU C++20 (64) TESTS 8 15 1228800
233216972 kiruxan B Nov. 17, 2023, 7:38 p.m. OK Go TESTS 8 46 8089600
233196513 ajayg3059 B Nov. 17, 2023, 4:54 p.m. OK Go TESTS 8 93 4915200
233216923 kiruxan B Nov. 17, 2023, 7:37 p.m. OK Go TESTS 8 187 7577600
233214153 RiceTofu B Nov. 17, 2023, 7:04 p.m. OK Java 11 TESTS 8 187 0
233223621 IceWolf898 B Nov. 17, 2023, 9:15 p.m. OK Java 11 TESTS 8 202 0
233200428 rezairianto B Nov. 17, 2023, 5:12 p.m. OK Java 11 TESTS 8 202 0
233245141 Nanthakumar06 B Nov. 18, 2023, 5:02 a.m. OK Java 11 TESTS 8 217 0
233234072 Edge_Tree B Nov. 18, 2023, 2:04 a.m. OK Java 11 TESTS 8 249 0
233236956 goldener B Nov. 18, 2023, 3 a.m. OK Java 11 TESTS 8 374 0
233219903 monukumar123 B Nov. 17, 2023, 8:16 p.m. OK Java 11 TESTS 8 389 0
233210094 kismyit B Nov. 17, 2023, 6:23 p.m. OK Java 11 TESTS 8 390 0
233229525 mrizzzz_03 B Nov. 17, 2023, 11:46 p.m. OK Java 11 TESTS 8 420 0
233219819 monukumar123 B Nov. 17, 2023, 8:15 p.m. OK Java 11 TESTS 8 420 0
233203737 Multi-Thread B Nov. 17, 2023, 5:32 p.m. OK Java 17 TESTS 8 202 307200
233196778 hNew18 B Nov. 17, 2023, 4:55 p.m. OK Java 17 TESTS 8 202 716800
233214686 dimitrov_jhunjhun B Nov. 17, 2023, 7:10 p.m. OK Java 17 TESTS 8 265 512000
233198978 navdeep__joshi B Nov. 17, 2023, 5:05 p.m. OK Java 17 TESTS 8 280 9625600
233206683 AKhacks B Nov. 17, 2023, 5:55 p.m. OK Java 17 TESTS 8 296 614400
233247009 me22btech11050 B Nov. 18, 2023, 5:23 a.m. OK Java 17 TESTS 8 405 614400
233238535 k.SUMANTH B Nov. 18, 2023, 3:26 a.m. OK Java 17 TESTS 8 405 614400
233227037 ishanmandal5 B Nov. 17, 2023, 10:29 p.m. OK Java 17 TESTS 8 405 614400
233192644 mahithamudireddy B Nov. 17, 2023, 4:45 p.m. OK Java 17 TESTS 8 436 716800
233212895 ram_666 B Nov. 17, 2023, 6:51 p.m. OK Java 17 TESTS 8 451 819200
233210476 fibukki B Nov. 17, 2023, 6:26 p.m. OK Java 21 TESTS 8 452 614400
233244548 dfhjkgs B Nov. 18, 2023, 4:55 a.m. OK Java 21 TESTS 8 482 716800
233220051 Bat454 B Nov. 17, 2023, 8:18 p.m. OK Java 21 TESTS 8 529 512000
233191628 nazimazhaan17 B Nov. 17, 2023, 4:43 p.m. OK Java 21 TESTS 8 530 716800
233204481 kid1110 B Nov. 17, 2023, 5:37 p.m. OK Java 21 TESTS 8 545 409600
233212257 Mahendra_Nath B Nov. 17, 2023, 6:44 p.m. OK Java 21 TESTS 8 561 512000
233200677 sulthanso73 B Nov. 17, 2023, 5:13 p.m. OK Java 21 TESTS 8 607 409600
233214554 madhav2800 B Nov. 17, 2023, 7:09 p.m. OK Java 8 TESTS 8 139 102400
233215110 akshaygupta26 B Nov. 17, 2023, 7:15 p.m. OK Java 8 TESTS 8 139 3686400
233234582 dsdkjwoejo B Nov. 18, 2023, 2:15 a.m. OK Java 8 TESTS 8 171 9318400
233247788 beka001 B Nov. 18, 2023, 5:32 a.m. OK Java 8 TESTS 8 186 1945600
233215843 sumitlaura101 B Nov. 17, 2023, 7:24 p.m. OK Java 8 TESTS 8 186 5939200
233223261 sagbis B Nov. 17, 2023, 9:09 p.m. OK Java 8 TESTS 8 187 1945600
233216670 sumitlaura101 B Nov. 17, 2023, 7:34 p.m. OK Java 8 TESTS 8 187 7475200
233213125 rajr86642 B Nov. 17, 2023, 6:54 p.m. OK Java 8 TESTS 8 233 1843200
233200684 californiaroll B Nov. 17, 2023, 5:13 p.m. OK Java 8 TESTS 8 389 0
233198633 kajalmishra B Nov. 17, 2023, 5:03 p.m. OK Kotlin 1.7 TESTS 8 560 50995200
233250011 Ravitosh B Nov. 18, 2023, 5:55 a.m. OK MS C++ 2017 TESTS 8 140 1228800
233208999 Irishidze B Nov. 17, 2023, 6:13 p.m. OK MS C++ 2017 TESTS 8 140 1228800
233204327 alex0511 B Nov. 17, 2023, 5:36 p.m. OK MS C++ 2017 TESTS 8 140 2355200
233192058 Furgoneta B Nov. 17, 2023, 4:44 p.m. OK MS C++ 2017 TESTS 8 156 1433600
233235991 Ir0nic_Joker B Nov. 18, 2023, 2:42 a.m. OK MS C++ 2017 TESTS 8 156 2457600
233196794 tatianyi B Nov. 17, 2023, 4:55 p.m. OK MS C++ 2017 TESTS 8 187 1843200
233200794 Tzity B Nov. 17, 2023, 5:14 p.m. OK MS C++ 2017 TESTS 8 218 614400
233197238 rsFalse B Nov. 17, 2023, 4:57 p.m. OK Perl TESTS 8 436 32256000
233193452 frost_14 B Nov. 17, 2023, 4:47 p.m. OK PyPy 3 TESTS 8 530 18124800
233219699 ami_ekta_robot B Nov. 17, 2023, 8:14 p.m. OK PyPy 3 TESTS 8 561 19251200
233219440 bxd B Nov. 17, 2023, 8:10 p.m. OK PyPy 3 TESTS 8 561 19251200
233197026 ayushmanpandey B Nov. 17, 2023, 4:56 p.m. OK PyPy 3 TESTS 8 655 19456000
233227543 AhsanRandhawa B Nov. 17, 2023, 10:42 p.m. OK PyPy 3 TESTS 8 748 14233600
233208639 Mukesh003 B Nov. 17, 2023, 6:10 p.m. OK PyPy 3 TESTS 8 810 14438400
233198752 geethapriyanka B Nov. 17, 2023, 5:03 p.m. OK PyPy 3 TESTS 8 826 14131200
233195093 harishbendale80 B Nov. 17, 2023, 4:49 p.m. OK PyPy 3 TESTS 8 826 14438400
233229277 DRDIV B Nov. 17, 2023, 11:37 p.m. OK PyPy 3 TESTS 8 888 14131200
233228243 derevianko152 B Nov. 17, 2023, 11:02 p.m. OK PyPy 3 TESTS 8 904 12185600
233193671 SoleProprietor B Nov. 17, 2023, 4:47 p.m. OK PyPy 3-64 TESTS 8 92 21708800
233233658 yskm-an B Nov. 18, 2023, 1:54 a.m. OK PyPy 3-64 TESTS 8 139 21811200
233198185 Bam25 B Nov. 17, 2023, 5:01 p.m. OK PyPy 3-64 TESTS 8 140 17715200
233232751 brightest66 B Nov. 18, 2023, 1:33 a.m. OK PyPy 3-64 TESTS 8 155 21606400
233213313 Alex239 B Nov. 17, 2023, 6:55 p.m. OK PyPy 3-64 TESTS 8 155 28876800
233193229 pusheen_1024 B Nov. 17, 2023, 4:46 p.m. OK PyPy 3-64 TESTS 8 170 17715200
233207974 Dert30 B Nov. 17, 2023, 6:05 p.m. OK PyPy 3-64 TESTS 8 171 18841600
233204314 prateek.goel.cs.2019 B Nov. 17, 2023, 5:36 p.m. OK PyPy 3-64 TESTS 8 171 24576000
233203024 abxxx B Nov. 17, 2023, 5:27 p.m. OK PyPy 3-64 TESTS 8 186 21811200
233213831 codeforcesHQ B Nov. 17, 2023, 7 p.m. OK PyPy 3-64 TESTS 8 202 21708800
233199557 Novasaki B Nov. 17, 2023, 5:08 p.m. OK Python 3 TESTS 8 280 24473600
233194073 guguang B Nov. 17, 2023, 4:48 p.m. OK Python 3 TESTS 8 295 20480000
233249305 acken B Nov. 18, 2023, 5:48 a.m. OK Python 3 TESTS 8 311 21196800
233195430 sravyadangeti B Nov. 17, 2023, 4:49 p.m. OK Python 3 TESTS 8 358 24678400
233195162 gowthamibobbili B Nov. 17, 2023, 4:49 p.m. OK Python 3 TESTS 8 358 24678400
233192845 Kiranmayi_18 B Nov. 17, 2023, 4:46 p.m. OK Python 3 TESTS 8 373 23756800
233196849 anjalisaride546 B Nov. 17, 2023, 4:55 p.m. OK Python 3 TESTS 8 373 24678400
233195662 sruthibunga18 B Nov. 17, 2023, 4:51 p.m. OK Python 3 TESTS 8 373 24678400
233194960 Poojitha_2108 B Nov. 17, 2023, 4:49 p.m. OK Python 3 TESTS 8 373 24678400
233191579 loshmi_419 B Nov. 17, 2023, 4:43 p.m. OK Python 3 TESTS 8 373 24678400
233194071 tamuraup_wa B Nov. 17, 2023, 4:48 p.m. OK Rust 2021 TESTS 8 15 6348800
233213964 Rajveer_100 B Nov. 17, 2023, 7:02 p.m. OK Rust 2021 TESTS 8 31 16281600

remove filters

Back to search problems