Codeforces Round 939 (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
1956 Codeforces Round 939 (Div. 2) FINISHED False 7200 24161063 April 13, 2024, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 21655 ) B Nene and the Card Game PROGRAMMING games greedy

B'You and Nene are playing a card game. The deck with 2n cards is used to play this game. Each card has an integer from 1 to n on it, and each of integers 1 through n appears exactly on 2 cards. Additionally, there is a table where cards are placed during the game (initially, the table is empty). In the beginning of the game, these 2n cards are distributed between you and Nene so that each player receives n cards. After it, you and Nene alternatively take 2n turns, i.e. each person takes n turns, starting with you. On each turn: Note that turns are made publicly: each player can see all the cards on the table at each moment. Nene is very smart so she always selects cards optimally in order to maximize her score in the end of the game (after 2n rounds). If she has several optimal moves, she selects the move that minimizes your score in the end of the game. More formally, Nene always takes turns optimally in order to maximize her score in the end of the game in the first place and to minimize your score in the end of the game in the second place. Assuming that the cards are already distributed and cards in your hand have integers a_1, a_2, ldots, a_n written on them, what is the maximum number of points you can get by taking your turns optimally? Each test contains multiple test cases. The first line contains the number of test cases t ( 1 <= t <= 10^4 ). The description of test cases follows. The first line contains a single integer n ( 1 <= n <= 2 cdot 10^5 ) -- the number of cards you and Nene receive in the beginning of the game. The second line contains n integers a_1, a_2, ldots, a_n ( 1 <= a_i <= n ) -- the integers on the cards in your hand. It is guaranteed that each integer from 1 through n appears in the sequence a_1, a_2, ldots, a_n at most 2 times. It is guaranteed that the sum of n over all test '...

Tutorials

[Editorial] Codeforces Round 939 (Div. 2)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
256544433 Avinvini B April 13, 2024, 5:40 p.m. OK C# 10 TESTS 13 124 13619200
256581933 koukilee B April 14, 2024, 2:02 a.m. OK C++14 (GCC 6-32) TESTS 13 46 20480000
256553851 chauhanasheesh B April 13, 2024, 6:47 p.m. OK C++14 (GCC 6-32) TESTS 13 77 0
256563905 coder1073 B April 13, 2024, 8:31 p.m. OK C++14 (GCC 6-32) TESTS 13 78 102400
256584162 WYZ20030051 B April 14, 2024, 2:42 a.m. OK C++14 (GCC 6-32) TESTS 13 78 4096000
256591098 lailai0916 B April 14, 2024, 4:38 a.m. OK C++14 (GCC 6-32) TESTS 13 92 921600
256594155 At_99.57 B April 14, 2024, 5:21 a.m. OK C++14 (GCC 6-32) TESTS 13 93 102400
256588885 Nanako7_ix B April 14, 2024, 4:02 a.m. OK C++14 (GCC 6-32) TESTS 13 93 102400
256551069 negetive_iq B April 13, 2024, 6:26 p.m. OK C++14 (GCC 6-32) TESTS 13 93 102400
256583763 Clark_Zhang B April 14, 2024, 2:34 a.m. OK C++14 (GCC 6-32) TESTS 13 93 307200
256591130 lailai0916 B April 14, 2024, 4:38 a.m. OK C++14 (GCC 6-32) TESTS 13 93 819200
256593146 Singh_Ram B April 14, 2024, 5:08 a.m. OK C++17 (GCC 7-32) TESTS 13 77 0
256591140 mynameissyj B April 14, 2024, 4:38 a.m. OK C++17 (GCC 7-32) TESTS 13 77 0
256590587 M133 B April 14, 2024, 4:29 a.m. OK C++17 (GCC 7-32) TESTS 13 77 0
256589119 tahsin_alam_dihan B April 14, 2024, 4:06 a.m. OK C++17 (GCC 7-32) TESTS 13 77 0
256588808 Kener_Castillo B April 14, 2024, 4:01 a.m. OK C++17 (GCC 7-32) TESTS 13 77 0
256585740 Cristiano_Ronaldo_ B April 14, 2024, 3:10 a.m. OK C++17 (GCC 7-32) TESTS 13 77 0
256584791 GGodSSpeed B April 14, 2024, 2:53 a.m. OK C++17 (GCC 7-32) TESTS 13 77 0
256579574 adil198 B April 14, 2024, 1:20 a.m. OK C++17 (GCC 7-32) TESTS 13 77 0
256562096 _Ryu__ B April 13, 2024, 8:11 p.m. OK C++17 (GCC 7-32) TESTS 13 77 0
256556740 Boltghostkartik B April 13, 2024, 7:13 p.m. OK C++17 (GCC 7-32) TESTS 13 77 0
256592541 nandhagk1729 B April 14, 2024, 5 a.m. OK C++20 (GCC 13-64) TESTS 13 62 0
256591506 GG_Panda B April 14, 2024, 4:44 a.m. OK C++20 (GCC 13-64) TESTS 13 62 0
256543482 Hrithik001 B April 13, 2024, 5:35 p.m. OK C++20 (GCC 13-64) TESTS 13 62 0
256594483 mskunal07 B April 14, 2024, 5:25 a.m. OK C++20 (GCC 13-64) TESTS 13 62 102400
256583766 tilenn B April 14, 2024, 2:34 a.m. OK C++20 (GCC 13-64) TESTS 13 62 102400
256582873 yanke B April 14, 2024, 2:18 a.m. OK C++20 (GCC 13-64) TESTS 13 62 102400
256548669 ABalobanov B April 13, 2024, 6:09 p.m. OK C++20 (GCC 13-64) TESTS 13 62 102400
256547400 omenn B April 13, 2024, 5:59 p.m. OK C++20 (GCC 13-64) TESTS 13 62 102400
256582903 Yile_Wang B April 14, 2024, 2:19 a.m. OK C++20 (GCC 13-64) TESTS 13 62 1638400
256596994 engage_R B April 14, 2024, 5:54 a.m. OK C++20 (GCC 13-64) TESTS 13 77 0
256582080 dhuyyyy B April 14, 2024, 2:05 a.m. OK FPC TESTS 13 109 921600
256594892 0x81 B April 14, 2024, 5:30 a.m. OK GNU C11 TESTS 13 46 307200
256594742 0x81 B April 14, 2024, 5:28 a.m. OK GNU C11 TESTS 13 46 307200
256529685 CS23B036 B April 13, 2024, 4:16 p.m. OK GNU C11 TESTS 13 77 2457600
256534499 MubtasimSajid B April 13, 2024, 4:27 p.m. OK GNU C11 TESTS 13 93 1638400
256538063 MongooseCatmouse B April 13, 2024, 4:33 p.m. OK GNU C11 TESTS 13 108 819200
256537138 samyasar2002 B April 13, 2024, 4:32 p.m. OK GNU C11 TESTS 13 108 1536000
256575612 muntasirmuhammad555 B April 13, 2024, 11:55 p.m. OK GNU C11 TESTS 13 108 1638400
256543552 priyaroy3370 B April 13, 2024, 5:36 p.m. OK Java 21 TESTS 13 249 512000
256595543 yuuki_n B April 14, 2024, 5:38 a.m. OK Java 21 TESTS 13 249 1228800
256579339 Mahinr10 B April 14, 2024, 1:15 a.m. OK Java 21 TESTS 13 296 716800
256562592 himneesh9 B April 13, 2024, 8:17 p.m. OK Java 21 TESTS 13 312 1228800
256548854 Mohit_Jaiswal10 B April 13, 2024, 6:10 p.m. OK Java 21 TESTS 13 327 16588800
256592611 wizwilzo B April 14, 2024, 5:01 a.m. OK Java 21 TESTS 13 343 21196800
256593458 Multi-Thread B April 14, 2024, 5:12 a.m. OK Java 21 TESTS 13 358 716800
256558466 iamdimonis B April 13, 2024, 7:31 p.m. OK Java 21 TESTS 13 358 19353600
256566922 M_Hassanin488 B April 13, 2024, 9:11 p.m. OK Java 21 TESTS 13 359 16896000
256587108 Nick B April 14, 2024, 3:34 a.m. OK Java 21 TESTS 13 359 19660800
256535046 golions B April 13, 2024, 4:28 p.m. OK Java 8 TESTS 13 171 0
256544635 Nagendravarma B April 13, 2024, 5:41 p.m. OK Java 8 TESTS 13 233 2560000
256537568 Kasiru_Yamagata B April 13, 2024, 4:33 p.m. OK Java 8 TESTS 13 281 16179200
256596195 Brajesh_Mishra B April 14, 2024, 5:45 a.m. OK Java 8 TESTS 13 374 0
256533604 vinayakgaikwad476 B April 13, 2024, 4:25 p.m. OK Java 8 TESTS 13 406 0
256534102 ayushsinghs347 B April 13, 2024, 4:26 p.m. OK Java 8 TESTS 13 421 0
256562772 Jubayer_Kabir B April 13, 2024, 8:19 p.m. OK Java 8 TESTS 13 437 0
256546620 Aldijohn B April 13, 2024, 5:54 p.m. OK Java 8 TESTS 13 452 0
256592221 lokesh77_508 B April 14, 2024, 4:55 a.m. OK Java 8 TESTS 13 452 11878400
256547198 rohilkadam36 B April 13, 2024, 5:58 p.m. OK Java 8 TESTS 13 453 0
256544469 xblwyc_hardcore B April 13, 2024, 5:40 p.m. OK Kotlin 1.9 TESTS 13 202 3584000
256579892 Slata B April 14, 2024, 1:26 a.m. OK PyPy 3 TESTS 13 218 19763200
256583549 khoisan25 B April 14, 2024, 2:30 a.m. OK PyPy 3 TESTS 13 296 20275200
256536154 Yasho_ham B April 13, 2024, 4:30 p.m. OK PyPy 3 TESTS 13 296 22220800
256590290 nealzane B April 14, 2024, 4:25 a.m. OK PyPy 3 TESTS 13 328 22528000
256543806 CodeArmy B April 13, 2024, 5:37 p.m. OK PyPy 3 TESTS 13 389 20172800
256593388 Ayushman_123 B April 14, 2024, 5:11 a.m. OK PyPy 3 TESTS 13 453 20889600
256558725 RobinFromTheHood B April 13, 2024, 7:34 p.m. OK PyPy 3-64 TESTS 13 140 20275200
256577132 quad_wipe B April 14, 2024, 12:30 a.m. OK PyPy 3-64 TESTS 13 155 26316800
256588079 Novasaki B April 14, 2024, 3:49 a.m. OK PyPy 3-64 TESTS 13 155 26828800
256549406 samchen123 B April 13, 2024, 6:14 p.m. OK PyPy 3-64 TESTS 13 156 20070400
256548265 pratyanch_jain B April 13, 2024, 6:05 p.m. OK PyPy 3-64 TESTS 13 156 28262400
256587587 Novasaki B April 14, 2024, 3:41 a.m. OK PyPy 3-64 TESTS 13 171 25907200
256532459 GiacAlex B April 13, 2024, 4:22 p.m. OK PyPy 3-64 TESTS 13 171 26214400
256585666 MdAshrafuzzaman_Sunny02 B April 14, 2024, 3:09 a.m. OK PyPy 3-64 TESTS 13 171 33280000
256557374 jvatsal0709 B April 13, 2024, 7:20 p.m. OK PyPy 3-64 TESTS 13 187 21401600
256531570 pratyanch_jain B April 13, 2024, 4:20 p.m. OK PyPy 3-64 TESTS 13 187 26828800
256588058 Novasaki B April 14, 2024, 3:49 a.m. OK Python 3 TESTS 13 125 28672000
256562151 Shadow23_ B April 13, 2024, 8:12 p.m. OK Python 3 TESTS 13 140 24678400
256530504 tickflag B April 13, 2024, 4:18 p.m. OK Python 3 TESTS 13 140 25088000
256546961 yuvan_surya B April 13, 2024, 5:56 p.m. OK Python 3 TESTS 13 140 25190400
256546943 ajaw3 B April 13, 2024, 5:56 p.m. OK Python 3 TESTS 13 140 25190400
256551652 Imran32 B April 13, 2024, 6:30 p.m. OK Python 3 TESTS 13 140 25702400
256579166 Logic_cf B April 14, 2024, 1:12 a.m. OK Python 3 TESTS 13 140 30720000
256551851 spatham B April 13, 2024, 6:32 p.m. OK Python 3 TESTS 13 140 32870400
256589229 Boomchillsss B April 14, 2024, 4:08 a.m. OK Python 3 TESTS 13 155 25190400
256543897 OLOGY B April 13, 2024, 5:37 p.m. OK Python 3 TESTS 13 155 25190400
256551131 0x81 B April 13, 2024, 6:26 p.m. OK Ruby 3 TESTS 13 453 35123200
256567439 vstiff B April 13, 2024, 9:19 p.m. OK Rust 2021 TESTS 13 62 1536000

remove filters

Back to search problems