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
( 18080 ) A MEX Game 1 PROGRAMMING brute force games greedy

B"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 one element from a , and then deletes it from a . The game ends when the array a is empty. Game's score is defined to be the MEX ^ dagger of c . Alice wants to maximize the score while Bob wants to minimize it. Find game's final score if both players play optimally. ^ 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 2 cdot 10^4 ) -- the number of test cases. The description of the test cases follows. The first line of each test case contains a single integer n ( 1 <= n <= 2 cdot 10^5 ). The second line of each test case contains n integers a_1, a_2, ldots, a_n ( 0 <= a_i < n ). It is guaranteed that the sum of n over all test cases does not exceed 2 cdot 10^5 . For each test case, find game's score if both players play optimally. In the first test case, a possible game with a score of 2 is as follows: At the end, c=[1,0] , which has a MEX of 2 . Note that this is an example game and does not necessarily represent the optimal strategy for both players. "...

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
251715085 mban259 A March 16, 2024, 2:49 p.m. OK C# 10 TESTS 20 155 17612800
251721241 Binp A March 16, 2024, 2:57 p.m. OK C++14 (GCC 6-32) TESTS 20 46 819200
251841075 masonpop A March 17, 2024, 12:31 a.m. OK C++14 (GCC 6-32) TESTS 20 46 1638400
251850109 goldener A March 17, 2024, 2:59 a.m. OK C++14 (GCC 6-32) TESTS 20 62 819200
251716081 using233 A March 16, 2024, 2:51 p.m. OK C++14 (GCC 6-32) TESTS 20 62 819200
251715830 MMYYFF A March 16, 2024, 2:50 p.m. OK C++14 (GCC 6-32) TESTS 20 62 819200
251709796 squaredog A March 16, 2024, 2:44 p.m. OK C++14 (GCC 6-32) TESTS 20 62 819200
251705342 LittleBeetle A March 16, 2024, 2:39 p.m. OK C++14 (GCC 6-32) TESTS 20 62 819200
251703736 crazy_sea A March 16, 2024, 2:38 p.m. OK C++14 (GCC 6-32) TESTS 20 62 819200
251702489 ppltn A March 16, 2024, 2:37 p.m. OK C++14 (GCC 6-32) TESTS 20 62 819200
251709069 flying A March 16, 2024, 2:43 p.m. OK C++14 (GCC 6-32) TESTS 20 62 921600
251705892 NTT A March 16, 2024, 2:40 p.m. OK C++17 (GCC 7-32) TESTS 20 15 819200
251703500 cmk666 A March 16, 2024, 2:38 p.m. OK C++17 (GCC 7-32) TESTS 20 15 2150400
251708275 ImmortaLimit A March 16, 2024, 2:42 p.m. OK C++17 (GCC 7-32) TESTS 20 15 19251200
251845298 threethreetwothree A March 17, 2024, 1:44 a.m. OK C++17 (GCC 7-32) TESTS 20 30 12390400
251706156 Legitimity A March 16, 2024, 2:40 p.m. OK C++17 (GCC 7-32) TESTS 20 31 3686400
251714025 KellyWLJ A March 16, 2024, 2:48 p.m. OK C++17 (GCC 7-32) TESTS 20 31 12288000
251851934 imxiaoyan A March 17, 2024, 3:24 a.m. OK C++17 (GCC 7-32) TESTS 20 46 819200
251737271 jmyszka A March 16, 2024, 3:17 p.m. OK C++17 (GCC 7-32) TESTS 20 46 819200
251716869 rqoi032 A March 16, 2024, 2:52 p.m. OK C++17 (GCC 7-32) TESTS 20 46 819200
251708952 Little_Xi A March 16, 2024, 2:43 p.m. OK C++17 (GCC 7-32) TESTS 20 46 819200
251703601 Gassa A March 16, 2024, 2:38 p.m. OK D TESTS 20 93 24576000
251848564 hawaii-ol A March 17, 2024, 2:36 a.m. OK GNU C11 TESTS 20 514 1024000
251719731 Duldek A March 16, 2024, 2:55 p.m. OK Go TESTS 20 109 4915200
251728390 danbanica A March 16, 2024, 3:06 p.m. OK Java 21 TESTS 20 358 204800
251709381 profchi A March 16, 2024, 2:43 p.m. OK Java 21 TESTS 20 374 8499200
251716502 saptarshi1729 A March 16, 2024, 2:51 p.m. OK Java 21 TESTS 20 389 48947200
251708713 yvbf A March 16, 2024, 2:43 p.m. OK Java 8 TESTS 20 140 0
251706578 iakovlev.zakhar A March 16, 2024, 2:40 p.m. OK Java 8 TESTS 20 171 2252800
251705326 SecondThread A March 16, 2024, 2:39 p.m. OK Java 8 TESTS 20 358 64716800
251702264 arvindf232 A March 16, 2024, 2:37 p.m. OK Kotlin 1.7 TESTS 20 421 17305600
251709756 wangchaohui A March 16, 2024, 2:44 p.m. OK Kotlin 1.9 TESTS 20 265 2969600
251707791 Tlatoani A March 16, 2024, 2:41 p.m. OK Kotlin 1.9 TESTS 20 358 13721600
251709408 misorin A March 16, 2024, 2:43 p.m. OK PyPy 3 TESTS 20 155 17100800
251849272 nealzane A March 17, 2024, 2:47 a.m. OK PyPy 3 TESTS 20 358 19763200
251712221 Shirotsume A March 16, 2024, 2:46 p.m. OK PyPy 3 TESTS 20 436 22425600
251706706 sushmanth.dampur8780 A March 16, 2024, 2:41 p.m. OK PyPy 3-64 TESTS 20 140 19968000
251705751 petamingks A March 16, 2024, 2:40 p.m. OK PyPy 3-64 TESTS 20 155 19968000
251704810 chinerist A March 16, 2024, 2:39 p.m. OK PyPy 3-64 TESTS 20 155 27238400
251709239 dabbler1 A March 16, 2024, 2:43 p.m. OK PyPy 3-64 TESTS 20 156 17100800
251707848 eepsilon A March 16, 2024, 2:42 p.m. OK PyPy 3-64 TESTS 20 156 19763200
251711801 hulahula32471 A March 16, 2024, 2:46 p.m. OK PyPy 3-64 TESTS 20 171 22220800
251707658 ankan2526 A March 16, 2024, 2:41 p.m. OK PyPy 3-64 TESTS 20 171 151654400
251712155 alxwen711 A March 16, 2024, 2:46 p.m. OK PyPy 3-64 TESTS 20 186 20172800
251702791 conqueror_of_tourist A March 16, 2024, 2:38 p.m. OK PyPy 3-64 TESTS 20 186 25907200
251759911 Alex239 A March 16, 2024, 3:50 p.m. OK PyPy 3-64 TESTS 20 187 18022400
251705554 Jimanbanashi A March 16, 2024, 2:40 p.m. OK Python 2 TESTS 20 124 11161600
251818286 OLOGY A March 16, 2024, 8:04 p.m. OK Python 2 TESTS 20 171 12185600
251826473 OLOGY A March 16, 2024, 9:09 p.m. OK Python 2 TESTS 20 187 12390400
251827419 OLOGY A March 16, 2024, 9:18 p.m. OK Python 2 TESTS 20 202 12288000
251827609 OLOGY A March 16, 2024, 9:20 p.m. OK Python 2 TESTS 20 202 12390400
251821243 Sabnaj_423 A March 16, 2024, 8:28 p.m. OK Python 3 TESTS 20 311 28672000
251853966 mohamedomarkaabar A March 17, 2024, 3:51 a.m. OK Python 3 TESTS 20 374 45772800
251733052 toomer A March 16, 2024, 3:11 p.m. OK Rust 2021 TESTS 20 15 7168000
251726787 sansen A March 16, 2024, 3:04 p.m. OK Rust 2021 TESTS 20 31 5632000
251713691 Egor A March 16, 2024, 2:48 p.m. OK Rust 2021 TESTS 20 78 4812800
251709609 brown_amaurotis A March 16, 2024, 2:44 p.m. OK Rust 2021 TESTS 20 186 6348800

remove filters

Back to search problems