Codeforces Round 924 (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
1928 Codeforces Round 924 (Div. 2) FINISHED False 7200 29535863 Feb. 11, 2024, 9:35 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 4455 ) D Lonely Mountain Dungeons PROGRAMMING binary search brute force data structures greedy math ternary search

B"Once, the people, elves, dwarves, and other inhabitants of Middle-earth gathered to reclaim the treasures stolen from them by Smaug. In the name of this great goal, they rallied around the powerful elf Timothy and began to plan the overthrow of the ruler of the Lonely Mountain. The army of Middle-earth inhabitants will consist of several squads. It is known that each pair of creatures of the same race, which are in different squads, adds b units to the total strength of the army. But since it will be difficult for Timothy to lead an army consisting of a large number of squads, the total strength of an army consisting of k squads is reduced by (k - 1) cdot x units. Note that the army always consists of at least one squad. It is known that there are n races in Middle-earth, and the number of creatures of the i -th race is equal to c_i . Help the inhabitants of Middle-earth determine the maximum strength of the army they can assemble. Each test consists of multiple test cases. The first line contains a single integer t ( 1 <= t <= 2 cdot 10^4 ) -- the number of test cases. The description of the test cases follows. The first line of each test case contains three integers n , b , and x ( 1 <= n <= 2 cdot 10^5 , 1 <= b <= 10^6, 0 <= x <= 10^9 ) -- the number of races and the constants b and x described above. The second line of each test case contains n integers c_1, c_2, ldots, c_n ( 1 <= c_i <= 2 cdot 10^5 ) -- the number of creatures of each of the n races. It is guaranteed that the sum of the values c_1 + c_2 + ldots + c_n over all test cases does not exceed 2 cdot 10^5 . For each test case, output a single integer -- the maximum strength of the army that the inhabitants of Middle-earth can assemble. In the first test case, the inhabitants of Middle-earth can form 3 squads. Since x = 0 , the army's strength will n"...

Tutorials

Codeforces Round 924 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
245855110 tgehr D Feb. 11, 2024, 12:18 p.m. OK D TESTS 32 61 13721600
245915025 NenadDapic D Feb. 11, 2024, 8:19 p.m. OK FPC TESTS 33 78 4915200
245922619 rainboy D Feb. 11, 2024, 10:20 p.m. OK GNU C11 TESTS 33 109 3481600
245932927 never-limited D Feb. 12, 2024, 3:05 a.m. OK GNU C++17 TESTS 33 31 819200
245864166 llzer D Feb. 11, 2024, 1:31 p.m. OK GNU C++17 TESTS 32 31 819200
245852135 Amdadul D Feb. 11, 2024, 11:58 a.m. OK GNU C++17 TESTS 32 31 1638400
245848846 Luvidi D Feb. 11, 2024, 11:33 a.m. OK GNU C++17 TESTS 32 31 1638400
245853987 nikaru.Hakamura D Feb. 11, 2024, 12:10 p.m. OK GNU C++17 TESTS 32 31 1638400
245862646 Tanzim_bn D Feb. 11, 2024, 1:19 p.m. OK GNU C++17 TESTS 32 31 3174400
245850743 LDM0116 D Feb. 11, 2024, 11:52 a.m. OK GNU C++17 TESTS 32 31 4812800
245932410 Drimpossible D Feb. 12, 2024, 2:53 a.m. OK GNU C++17 TESTS 33 31 8192000
245854955 _Sheepsheep D Feb. 11, 2024, 12:16 p.m. OK GNU C++17 TESTS 32 46 102400
245850741 Harsh_kunwar D Feb. 11, 2024, 11:52 a.m. OK GNU C++17 TESTS 32 46 204800
245860753 harshit.300 D Feb. 11, 2024, 1:03 p.m. OK GNU C++17 (64) TESTS 32 15 4198400
245864185 _liuyi_ D Feb. 11, 2024, 1:31 p.m. OK GNU C++17 (64) TESTS 32 15 16076800
245860486 CoffeeFish D Feb. 11, 2024, 1:01 p.m. OK GNU C++17 (64) TESTS 32 30 819200
245866678 Samiul2651 D Feb. 11, 2024, 1:47 p.m. OK GNU C++17 (64) TESTS 32 30 1638400
245904544 daud04 D Feb. 11, 2024, 6:28 p.m. OK GNU C++17 (64) TESTS 33 31 0
245900350 stcmuyi D Feb. 11, 2024, 5:53 p.m. OK GNU C++17 (64) TESTS 33 31 0
245905383 daud04 D Feb. 11, 2024, 6:36 p.m. OK GNU C++17 (64) TESTS 33 31 0
245930426 sprads D Feb. 12, 2024, 1:59 a.m. OK GNU C++17 (64) TESTS 33 31 819200
245934633 _Sunmoon_ D Feb. 12, 2024, 3:38 a.m. OK GNU C++17 (64) TESTS 33 31 1638400
245938366 Moonshine_sake D Feb. 12, 2024, 4:49 a.m. OK GNU C++17 (64) TESTS 33 31 1638400
245851060 Anshu019 D Feb. 11, 2024, 11:52 a.m. OK GNU C++20 (64) TESTS 32 15 1638400
245858044 alamsyahn D Feb. 11, 2024, 12:41 p.m. OK GNU C++20 (64) TESTS 32 15 1638400
245852604 _ahmed_tawfik_ D Feb. 11, 2024, 12:01 p.m. OK GNU C++20 (64) TESTS 32 15 1638400
245867932 fryingduc D Feb. 11, 2024, 1:54 p.m. OK GNU C++20 (64) TESTS 32 15 3174400
245932633 hhhxxxyyy3 D Feb. 12, 2024, 2:58 a.m. OK GNU C++20 (64) TESTS 33 15 6041600
245851542 zezoo050 D Feb. 11, 2024, 11:55 a.m. OK GNU C++20 (64) TESTS 32 30 819200
245915156 Blaze_Sharp D Feb. 11, 2024, 8:21 p.m. OK GNU C++20 (64) TESTS 33 30 819200
245858965 coderPSP D Feb. 11, 2024, 12:49 p.m. OK GNU C++20 (64) TESTS 32 30 1638400
245859058 prakhar2704 D Feb. 11, 2024, 12:50 p.m. OK GNU C++20 (64) TESTS 32 30 1638400
245851499 Ay-hay D Feb. 11, 2024, 11:54 a.m. OK GNU C++20 (64) TESTS 32 30 1638400
245861104 profchi D Feb. 11, 2024, 1:06 p.m. OK Java 21 TESTS 32 295 716800
245854502 vaibhav_1710 D Feb. 11, 2024, 12:13 p.m. OK Java 21 TESTS 32 296 204800
245869944 mapleKing D Feb. 11, 2024, 2:10 p.m. OK Java 21 TESTS 33 311 0
245896509 santanu021 D Feb. 11, 2024, 5:22 p.m. OK Java 21 TESTS 33 326 102400
245849166 120cs0005 D Feb. 11, 2024, 11:33 a.m. OK Java 21 TESTS 32 343 0
245855557 vijay_panwar12 D Feb. 11, 2024, 12:21 p.m. OK Java 21 TESTS 32 373 102400
245911714 AK18 D Feb. 11, 2024, 7:41 p.m. OK Java 21 TESTS 33 389 307200
245880800 priyaroy3370 D Feb. 11, 2024, 3:26 p.m. OK Java 21 TESTS 33 483 204800
245849309 shaili17 D Feb. 11, 2024, 11:34 a.m. OK Java 21 TESTS 32 576 204800
245938527 Sumitsingh7 D Feb. 12, 2024, 4:51 a.m. OK Java 8 TESTS 33 483 5836800
245938583 Sumitsingh7 D Feb. 12, 2024, 4:52 a.m. OK Java 8 TESTS 33 498 5836800
245864074 lxn D Feb. 11, 2024, 1:30 p.m. OK MS C++ 2017 TESTS 32 109 3174400
245850920 IL1on1090 D Feb. 11, 2024, 11:52 a.m. OK MS C++ 2017 TESTS 32 124 1638400
245855792 ahtoh_ D Feb. 11, 2024, 12:23 p.m. OK Node.js TESTS 32 124 11878400
245870583 ErikUs D Feb. 11, 2024, 2:15 p.m. OK PyPy 3 TESTS 33 748 12800000
245905870 Ali_P D Feb. 11, 2024, 6:40 p.m. OK PyPy 3 TESTS 33 873 14131200
245922057 Remineva D Feb. 11, 2024, 10:10 p.m. OK PyPy 3-64 TESTS 33 171 23347200
245918588 gardengnome D Feb. 11, 2024, 9:10 p.m. OK PyPy 3-64 TESTS 33 186 22835200
245880447 gardengnome D Feb. 11, 2024, 3:24 p.m. OK PyPy 3-64 TESTS 33 186 22835200
245901667 sushmanth.dampur8780 D Feb. 11, 2024, 6:03 p.m. OK PyPy 3-64 TESTS 33 202 22016000
245874279 34z12000 D Feb. 11, 2024, 2:45 p.m. OK PyPy 3-64 TESTS 33 202 22835200
245922360 Remineva D Feb. 11, 2024, 10:15 p.m. OK PyPy 3-64 TESTS 33 202 23347200
245883790 zxnwqr D Feb. 11, 2024, 3:47 p.m. OK PyPy 3-64 TESTS 33 202 29696000
245855860 ptripathy013 D Feb. 11, 2024, 12:23 p.m. OK PyPy 3-64 TESTS 32 202 29696000
245922281 Remineva D Feb. 11, 2024, 10:14 p.m. OK PyPy 3-64 TESTS 33 217 23347200
245880023 Little_Sheep_Yawn D Feb. 11, 2024, 3:21 p.m. OK PyPy 3-64 TESTS 33 218 26419200
245858633 YudoTLE D Feb. 11, 2024, 12:46 p.m. OK Python 3 TESTS 32 436 13926400
245856413 liut D Feb. 11, 2024, 12:28 p.m. OK Rust 2021 TESTS 32 31 1638400
245892097 vstiff D Feb. 11, 2024, 4:46 p.m. OK Rust 2021 TESTS 33 31 5120000
245858584 ZigIsBestLanguage D Feb. 11, 2024, 12:46 p.m. OK Rust 2021 TESTS 32 202 3174400
245851737 togatoga D Feb. 11, 2024, 11:56 a.m. OK Rust 2021 TESTS 32 218 13619200

remove filters

Back to search problems