Codeforces Round 934 (Div. 1)

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
1943 Codeforces Round 934 (Div. 1) FINISHED False 8700 21223499 March 16, 2024, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 441 ) E1 MEX Game 2 (Easy Version) PROGRAMMING binary search brute force greedy

B"This is the easy version of the problem. The only difference between the two versions is the constraint on t , m and the sum of m . You can make hacks only if both versions of the problem are solved. Alice and Bob play yet another game on an array a of size n . Alice starts with an empty array c . Both players take turns playing, with Alice starting first. On Alice's turn, she picks one element from a , appends that element to c , and then deletes it from a . On Bob's turn, he picks at most k elements from a , and then deletes it from a . The game ends when the array a is empty. Alice's score is defined to be the MEX ^ dagger of c . Alice wants to maximize her score while Bob wants to minimize it. Find Alice's final score if both players play optimally. The array will be given in compressed format. Instead of giving the elements present in the array, we will be giving their frequencies. Formally, you will be given m , the maximum element in the array, and then m + 1 integers f_0, f_1, ldots, f_m , where f_i represents the number of times i occurs in the array a . ^ dagger The operatorname{MEX} (minimum excludant) of an array of integers is defined as the smallest non-negative integer which does not occur in the array. For example: Each test contains multiple test cases. The first line contains a single integer t ( 1 <= q t <= q 500 ) -- the number of test cases. The description of the test cases follows. The first line of each test case contains two integers m and k ( 1 <= m <= 50, 1 <= k <= 10^9 ). The second line contains m + 1 integers f_0, f_1, ldots, f_m ( 1 <= f_i <= 10^9 ). It is guaranteed the sum of m over all test cases does not exceed 1000 . For each test case, find Alice's score if both players play optimally. In the first test case, the array a is "...

Tutorials

Codeforces Round #934 (Div1, Div2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
251768616 Crystally E1 March 16, 2024, 4:05 p.m. OK C++14 (GCC 6-32) TESTS 44 15 12083200
251833682 Alekseyka20x E1 March 16, 2024, 10:24 p.m. OK C++14 (GCC 6-32) TESTS 44 31 204800
251784347 rfpermen E1 March 16, 2024, 4:38 p.m. OK C++14 (GCC 6-32) TESTS 44 31 307200
251841817 qwef_ E1 March 17, 2024, 12:44 a.m. OK C++14 (GCC 6-32) TESTS 44 46 12083200
251786090 ppltn E1 March 16, 2024, 4:43 p.m. OK C++14 (GCC 6-32) TESTS 44 218 204800
251781255 StarSilk E1 March 16, 2024, 4:31 p.m. OK C++14 (GCC 6-32) TESTS 44 312 0
251833854 maroo1234 E1 March 16, 2024, 10:27 p.m. OK C++17 (GCC 7-32) TESTS 44 15 0
251790910 GoatMessi30 E1 March 16, 2024, 4:55 p.m. OK C++17 (GCC 7-32) TESTS 44 15 0
251786231 dlalswp25 E1 March 16, 2024, 4:43 p.m. OK C++17 (GCC 7-32) TESTS 44 15 0
251785459 dXqwq E1 March 16, 2024, 4:41 p.m. OK C++17 (GCC 7-32) TESTS 44 15 0
251783195 JoesSR_ E1 March 16, 2024, 4:36 p.m. OK C++17 (GCC 7-32) TESTS 44 15 0
251780315 zhangjianjuncd E1 March 16, 2024, 4:29 p.m. OK C++17 (GCC 7-32) TESTS 44 15 0
251779122 Nyaan E1 March 16, 2024, 4:27 p.m. OK C++17 (GCC 7-32) TESTS 44 15 204800
251775690 yuto1115 E1 March 16, 2024, 4:20 p.m. OK C++17 (GCC 7-32) TESTS 44 15 204800
251772657 AlternatingCurrent E1 March 16, 2024, 4:13 p.m. OK C++17 (GCC 7-32) TESTS 44 15 204800
251761808 jiangly E1 March 16, 2024, 3:53 p.m. OK C++17 (GCC 7-32) TESTS 44 15 204800
251792816 Gassa E1 March 16, 2024, 4:59 p.m. OK D TESTS 44 358 2150400
251807982 arvindf232 E1 March 16, 2024, 6:47 p.m. OK Kotlin 1.9 TESTS 44 389 921600
251779959 Tlatoani E1 March 16, 2024, 4:28 p.m. OK Kotlin 1.9 TESTS 44 436 1126400
251782201 conqueror_of_tourist E1 March 16, 2024, 4:33 p.m. OK PyPy 3-64 TESTS 44 467 9932800
251771277 Egor E1 March 16, 2024, 4:11 p.m. OK Rust 2021 TESTS 44 31 102400

remove filters

Back to search problems