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
( 22190 ) A Nene's Game PROGRAMMING brute force greedy

B'Nene invented a new game based on an increasing sequence of integers a_1, a_2, ldots, a_k . In this game, initially n players are lined up in a row. In each of the rounds of this game, the following happens: Once no one is kicked out of the game in some round, all the players that are still in the game are declared as winners. For example, consider the game with a=[3, 5] and n=5 players. Let the players be named player A, player B, ldots , player E in the order they are lined up initially. Then, Nene has not yet decided how many people would join the game initially. Nene gave you q integers n_1, n_2, ldots, n_q and you should answer the following question for each 1 <= i <= q independently: Each test contains multiple test cases. The first line contains the number of test cases t ( 1 <= t <= 250 ). The description of test cases follows. The first line case contains two integers k and q ( 1 <= k, q <= 100 ) -- the length of the sequence a and the number of values n_i you should solve this problem for. The second line contains k integers a_1,a_2, ldots,a_k ( 1 <= q a_1<a_2< ldots<a_k <= q 100 ) -- the sequence a . The third line contains q integers n_1,n_2, ldots,n_q ( 1 <= q n_i <= q 100 ). For each test case, output q integers: the i -th ( 1 <= i <= q ) of them should be the number of players declared as winners if initially n_i players join the game. The first test case was explained in the statement. In the second test case, when n=1 , the only player stays in the game in the first round. After that, the game ends and the only player is declared as a winner. '...

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
256544034 Avinvini A April 13, 2024, 5:38 p.m. OK C# 10 TESTS 9 124 3072000
256597244 luogu_bot4 A April 14, 2024, 5:56 a.m. OK C++14 (GCC 6-32) TESTS 10 46 0
256581615 yangshiyu A April 14, 2024, 1:55 a.m. OK C++14 (GCC 6-32) TESTS 10 46 0
256597435 roumeideclown A April 14, 2024, 5:58 a.m. OK C++14 (GCC 6-32) TESTS 10 46 0
256593401 SamHJD A April 14, 2024, 5:11 a.m. OK C++14 (GCC 6-32) TESTS 10 46 102400
256588247 icon_zzz A April 14, 2024, 3:52 a.m. OK C++14 (GCC 6-32) TESTS 10 46 102400
256584063 g1ove A April 14, 2024, 2:40 a.m. OK C++14 (GCC 6-32) TESTS 10 46 102400
256587180 Krish_Chothani A April 14, 2024, 3:35 a.m. OK C++14 (GCC 6-32) TESTS 10 46 102400
256597089 luogu_bot2 A April 14, 2024, 5:55 a.m. OK C++14 (GCC 6-32) TESTS 10 46 102400
256596753 hao__zi A April 14, 2024, 5:51 a.m. OK C++14 (GCC 6-32) TESTS 10 46 102400
256593776 buqu A April 14, 2024, 5:16 a.m. OK C++14 (GCC 6-32) TESTS 10 46 102400
256590174 Arghay013 A April 14, 2024, 4:23 a.m. OK C++17 (GCC 7-32) TESTS 10 46 0
256595650 TLExceeded A April 14, 2024, 5:39 a.m. OK C++17 (GCC 7-32) TESTS 10 46 0
256595509 Believer_112 A April 14, 2024, 5:37 a.m. OK C++17 (GCC 7-32) TESTS 10 46 0
256594600 ayaaz_1 A April 14, 2024, 5:26 a.m. OK C++17 (GCC 7-32) TESTS 10 46 0
256594478 c0mpl3x_alpha A April 14, 2024, 5:25 a.m. OK C++17 (GCC 7-32) TESTS 10 46 0
256594449 Night_Wind A April 14, 2024, 5:24 a.m. OK C++17 (GCC 7-32) TESTS 10 46 0
256592728 code.adi43 A April 14, 2024, 5:02 a.m. OK C++17 (GCC 7-32) TESTS 10 46 0
256592569 _FR_ A April 14, 2024, 5 a.m. OK C++17 (GCC 7-32) TESTS 10 46 0
256592551 aarjavjain29 A April 14, 2024, 5 a.m. OK C++17 (GCC 7-32) TESTS 10 46 0
256590142 anujtr A April 14, 2024, 4:23 a.m. OK C++17 (GCC 7-32) TESTS 10 46 0
256590020 the_fool A April 14, 2024, 4:21 a.m. OK C++20 (GCC 13-64) TESTS 10 46 0
256596482 akshay402 A April 14, 2024, 5:48 a.m. OK C++20 (GCC 13-64) TESTS 10 46 0
256592558 nandhagk1729 A April 14, 2024, 5 a.m. OK C++20 (GCC 13-64) TESTS 10 46 0
256592040 VSK18 A April 14, 2024, 4:53 a.m. OK C++20 (GCC 13-64) TESTS 10 46 0
256590743 vahmad A April 14, 2024, 4:32 a.m. OK C++20 (GCC 13-64) TESTS 10 46 0
256590109 why_me1 A April 14, 2024, 4:22 a.m. OK C++20 (GCC 13-64) TESTS 10 46 0
256590048 thowfiqul_58 A April 14, 2024, 4:21 a.m. OK C++20 (GCC 13-64) TESTS 10 46 0
256589918 Kris_24 A April 14, 2024, 4:19 a.m. OK C++20 (GCC 13-64) TESTS 10 46 0
256589221 vansh9927 A April 14, 2024, 4:08 a.m. OK C++20 (GCC 13-64) TESTS 10 46 0
256588016 Ali_Sensei A April 14, 2024, 3:48 a.m. OK C++20 (GCC 13-64) TESTS 10 46 0
256589008 bluemegane A April 14, 2024, 4:04 a.m. OK C# 8 TESTS 10 124 3174400
256592869 CDTheGod A April 14, 2024, 5:04 a.m. OK GNU C11 TESTS 10 139 102400
256531568 wzsy A April 13, 2024, 4:20 p.m. OK GNU C11 TESTS 9 140 0
256534557 Yasho_ham A April 13, 2024, 4:27 p.m. OK GNU C11 TESTS 9 140 102400
256590504 Motaher_emon A April 14, 2024, 4:28 a.m. OK GNU C11 TESTS 10 140 102400
256554096 kohlidhoni A April 13, 2024, 6:49 p.m. OK GNU C11 TESTS 9 140 102400
256572316 muntasirmuhammad555 A April 13, 2024, 10:44 p.m. OK GNU C11 TESTS 10 156 102400
256529655 nAnA_G A April 13, 2024, 4:16 p.m. OK GNU C11 TESTS 9 186 102400
256530333 samay4927 A April 13, 2024, 4:18 p.m. OK GNU C11 TESTS 9 187 102400
256567744 lorenzotinfena A April 13, 2024, 9:23 p.m. OK Go TESTS 10 61 307200
256567636 lorenzotinfena A April 13, 2024, 9:21 p.m. OK Go TESTS 10 62 307200
256544644 prsto_pavel A April 13, 2024, 5:41 p.m. OK Go TESTS 9 218 5734400
256594158 yuuki_n A April 14, 2024, 5:21 a.m. OK Java 21 TESTS 10 233 716800
256576498 soutRian A April 14, 2024, 12:15 a.m. OK Java 21 TESTS 10 234 204800
256580494 noname_20 A April 14, 2024, 1:39 a.m. OK Java 21 TESTS 10 234 512000
256585702 priyaroy3370 A April 14, 2024, 3:09 a.m. OK Java 21 TESTS 10 265 512000
256586632 Nick A April 14, 2024, 3:25 a.m. OK Java 21 TESTS 10 280 716800
256558086 himneesh9 A April 13, 2024, 7:27 p.m. OK Java 21 TESTS 10 281 716800
256556880 iamdimonis A April 13, 2024, 7:15 p.m. OK Java 21 TESTS 9 296 716800
256592462 Multi-Thread A April 14, 2024, 4:59 a.m. OK Java 21 TESTS 10 296 921600
256597477 AKhacks A April 14, 2024, 5:59 a.m. OK Java 21 TESTS 10 311 819200
256589699 bharath20 A April 14, 2024, 4:15 a.m. OK Java 21 TESTS 10 343 921600
256591386 joycelalalayaa A April 14, 2024, 4:42 a.m. OK Java 8 TESTS 10 155 39321600
256591251 SecondThread A April 14, 2024, 4:40 a.m. OK Java 8 TESTS 10 155 39321600
256533449 golions A April 13, 2024, 4:25 p.m. OK Java 8 TESTS 9 171 0
256592301 ajay.code04 A April 14, 2024, 4:56 a.m. OK Java 8 TESTS 10 187 0
256544276 Nagendravarma A April 13, 2024, 5:39 p.m. OK Java 8 TESTS 9 187 0
256590820 lokesh77_508 A April 14, 2024, 4:33 a.m. OK Java 8 TESTS 10 233 0
256595646 ayushsinghs347 A April 14, 2024, 5:39 a.m. OK Java 8 TESTS 10 234 0
256593384 sameer_ahmed A April 14, 2024, 5:11 a.m. OK Java 8 TESTS 10 249 0
256592410 sambhavvinayak16 A April 14, 2024, 4:58 a.m. OK Java 8 TESTS 10 249 0
256557955 Maheshwari_Saksham A April 13, 2024, 7:26 p.m. OK Java 8 TESTS 10 264 0
256533508 Gavkoshmug1 A April 13, 2024, 4:25 p.m. OK Kotlin 1.9 TESTS 9 187 307200
256544620 xblwyc_hardcore A April 13, 2024, 5:41 p.m. OK Kotlin 1.9 TESTS 9 218 1331200
256531711 ce20026 A April 13, 2024, 4:21 p.m. OK Kotlin 1.9 TESTS 9 265 409600
256553223 khoisan25 A April 13, 2024, 6:42 p.m. OK PyPy 3 TESTS 9 155 3891200
256579567 Slata A April 14, 2024, 1:20 a.m. OK PyPy 3 TESTS 10 155 4812800
256596410 vgeorgieva A April 14, 2024, 5:47 a.m. OK PyPy 3 TESTS 10 171 3993600
256592300 Ayushman_123 A April 14, 2024, 4:56 a.m. OK PyPy 3 TESTS 10 280 10035200
256587229 Mohamed_Hamed A April 14, 2024, 3:36 a.m. OK PyPy 3-64 TESTS 10 108 6348800
256533836 naruto7uzumaki A April 13, 2024, 4:25 p.m. OK PyPy 3-64 TESTS 9 109 2252800
256556451 rmr A April 13, 2024, 7:10 p.m. OK PyPy 3-64 TESTS 9 109 2662400
256548287 samchen123 A April 13, 2024, 6:06 p.m. OK PyPy 3-64 TESTS 9 109 3584000
256581524 mikeac A April 14, 2024, 1:54 a.m. OK PyPy 3-64 TESTS 10 109 6246400
256548175 Nullz A April 13, 2024, 6:05 p.m. OK PyPy 3-64 TESTS 9 139 5427200
256546544 Codness50 A April 13, 2024, 5:53 p.m. OK PyPy 3-64 TESTS 9 139 5632000
256532842 mayank21264 A April 13, 2024, 4:23 p.m. OK PyPy 3-64 TESTS 9 140 5427200
256573318 DarkTemplarDrop A April 13, 2024, 11:06 p.m. OK PyPy 3-64 TESTS 10 140 6963200
256597412 udiandianis A April 14, 2024, 5:58 a.m. OK PyPy 3-64 TESTS 10 140 7987200
256545243 mihajlovskijr A April 13, 2024, 5:45 p.m. OK Python 3 TESTS 9 78 0
256591321 manoharsingh2402 A April 14, 2024, 4:41 a.m. OK Python 3 TESTS 10 93 0
256589102 Boomchillsss A April 14, 2024, 4:06 a.m. OK Python 3 TESTS 10 93 0
256586720 sekiro1 A April 14, 2024, 3:26 a.m. OK Python 3 TESTS 10 93 0
256583398 cc_yuan A April 14, 2024, 2:27 a.m. OK Python 3 TESTS 10 93 0
256583134 sahiltomar100303 A April 14, 2024, 2:23 a.m. OK Python 3 TESTS 10 93 0
256565690 9ine A April 13, 2024, 8:54 p.m. OK Python 3 TESTS 10 93 0
256563883 Fgdg45 A April 13, 2024, 8:31 p.m. OK Python 3 TESTS 10 93 0
256543840 OLOGY A April 13, 2024, 5:37 p.m. OK Python 3 TESTS 9 93 0
256593049 vaibsoid A April 14, 2024, 5:06 a.m. OK Python 3 TESTS 10 93 102400
256545178 0x81 A April 13, 2024, 5:45 p.m. OK Ruby 3 TESTS 9 327 1433600
256544864 0x81 A April 13, 2024, 5:43 p.m. OK Ruby 3 TESTS 9 390 1433600
256566666 vstiff A April 13, 2024, 9:08 p.m. OK Rust 2021 TESTS 10 46 102400

remove filters

Back to search problems