Codeforces Round 919 (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
1920 Codeforces Round 919 (Div. 2) FINISHED False 7200 26666699 Jan. 13, 2024, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 5659 ) D Array Repetition PROGRAMMING binary search data structures dp implementation math

B"Jayden has an array a which is initially empty. There are n operations of two types he must perform in the given order. Jayden has q queries. For each query, you must tell him the k -th element of array a . The elements of the array are numbered from 1 . Each test consists of multiple test cases. The first line contains a single integer t ( 1 <= q t <= q 5000 ) -- the number of test cases. The description of the test cases follows. The first line of each test case contains two integers n and q ( 1 <= q n, q <= q 10^5 ) -- the number of operations and the number of queries. The following n lines describe the operations. Each line contains two integers b and x ( b in {1, 2 } ), where b denotes the type of operation. If b=1 , then x ( 1 <= q x <= q n ) is the integer Jayden appends to the end of the array. If b=2 , then x ( 1 <= q x <= q 10^9 ) is the number of copies Jayden appends to the end of the array. The next line of each test case contains q integers k_1, k_2, ldots, k_q ( 1 <= q k_i <= q min(10^{18}, c) ), which denote the queries, where c is the size of the array after finishing all n operations. It is guaranteed that the sum of n and the sum of q over all test cases does not exceed 10^5 . For each test case, output q integers -- answers to Jayden's queries. In the first test case: In the fourth test case, after all operations a = [1, 2] . "...

Tutorials

Editorial for Codeforces Round #919 (Div. 2)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
241489326 doublethinker D Jan. 13, 2024, 5:18 p.m. OK C# 10 TESTS 31 249 22937600
241480689 volhalink D Jan. 13, 2024, 4:24 p.m. OK C# 10 TESTS 31 639 32563200
241485642 LaurenceD D Jan. 13, 2024, 4:34 p.m. OK GNU C++14 TESTS 31 171 1126400
241531669 Gaomer D Jan. 14, 2024, 5:54 a.m. OK GNU C++14 TESTS 33 171 1740800
241496211 M.AmmarZia D Jan. 13, 2024, 6:02 p.m. OK GNU C++14 TESTS 33 186 1433600
241480597 wuyouka D Jan. 13, 2024, 4:23 p.m. OK GNU C++14 TESTS 31 186 80998400
241496328 pcajourney D Jan. 13, 2024, 6:03 p.m. OK GNU C++14 TESTS 33 187 1638400
241492893 TrendBattles D Jan. 13, 2024, 5:37 p.m. OK GNU C++14 TESTS 31 187 3174400
241492748 M.Ayaan_Ahmad D Jan. 13, 2024, 5:36 p.m. OK GNU C++14 TESTS 31 202 1433600
241498087 SharkDrill D Jan. 13, 2024, 6:18 p.m. OK GNU C++14 TESTS 33 202 11264000
241490097 0123456789_2024 D Jan. 13, 2024, 5:22 p.m. OK GNU C++14 TESTS 31 202 57651200
241483664 bloodyvj D Jan. 13, 2024, 4:30 p.m. OK GNU C++14 TESTS 31 218 2969600
241480380 htnaver D Jan. 13, 2024, 4:23 p.m. OK GNU C++17 TESTS 31 155 716800
241508518 rfhalb D Jan. 13, 2024, 8:30 p.m. OK GNU C++17 TESTS 33 156 6656000
241529262 Ste D Jan. 14, 2024, 5:26 a.m. OK GNU C++17 TESTS 33 170 1126400
241493693 sas4eka D Jan. 13, 2024, 5:43 p.m. OK GNU C++17 TESTS 31 171 716800
241529423 Ste D Jan. 14, 2024, 5:27 a.m. OK GNU C++17 TESTS 33 171 1126400
241480518 siewjh D Jan. 13, 2024, 4:23 p.m. OK GNU C++17 TESTS 31 171 1331200
241496197 rumike D Jan. 13, 2024, 6:02 p.m. OK GNU C++17 TESTS 33 171 1433600
241485456 vishnugupta123 D Jan. 13, 2024, 4:33 p.m. OK GNU C++17 TESTS 31 171 1638400
241492807 NisarAhmad_ D Jan. 13, 2024, 5:37 p.m. OK GNU C++17 TESTS 31 171 2560000
241513110 P500 D Jan. 13, 2024, 10:15 p.m. OK GNU C++17 TESTS 33 171 5120000
241498007 zjsdut D Jan. 13, 2024, 6:17 p.m. OK GNU C++17 (64) TESTS 33 109 1024000
241493920 zjsdut D Jan. 13, 2024, 5:44 p.m. OK GNU C++17 (64) TESTS 31 124 409600
241497281 zjsdut D Jan. 13, 2024, 6:11 p.m. OK GNU C++17 (64) TESTS 33 124 1024000
241494432 zjsdut D Jan. 13, 2024, 5:48 p.m. OK GNU C++17 (64) TESTS 33 124 1024000
241485009 apricity D Jan. 13, 2024, 4:33 p.m. OK GNU C++17 (64) TESTS 31 124 1638400
241522672 youthPaul D Jan. 14, 2024, 3:24 a.m. OK GNU C++17 (64) TESTS 33 124 4403200
241529919 hexuanjxm D Jan. 14, 2024, 5:34 a.m. OK GNU C++17 (64) TESTS 33 139 1228800
241512778 giga-bit D Jan. 13, 2024, 10:04 p.m. OK GNU C++17 (64) TESTS 33 139 9420800
241529386 XIM111 D Jan. 14, 2024, 5:27 a.m. OK GNU C++17 (64) TESTS 33 139 14950400
241522620 youthPaul D Jan. 14, 2024, 3:22 a.m. OK GNU C++17 (64) TESTS 33 140 4403200
241489520 874641984 D Jan. 13, 2024, 5:19 p.m. OK GNU C++20 (64) TESTS 31 93 1228800
241490931 PMiguelez D Jan. 13, 2024, 5:26 p.m. OK GNU C++20 (64) TESTS 31 93 2764800
241499219 akkafakka D Jan. 13, 2024, 6:29 p.m. OK GNU C++20 (64) TESTS 33 93 9216000
241499123 aka26nsh D Jan. 13, 2024, 6:28 p.m. OK GNU C++20 (64) TESTS 33 93 9216000
241499235 MithilaReich D Jan. 13, 2024, 6:29 p.m. OK GNU C++20 (64) TESTS 33 108 4505600
241498880 isnotavail D Jan. 13, 2024, 6:26 p.m. OK GNU C++20 (64) TESTS 33 108 4505600
241490533 heavenly_ D Jan. 13, 2024, 5:24 p.m. OK GNU C++20 (64) TESTS 31 109 921600
241519389 alvinhsu D Jan. 14, 2024, 2:08 a.m. OK GNU C++20 (64) TESTS 33 109 1024000
241528887 Pan_ma_ru D Jan. 14, 2024, 5:20 a.m. OK GNU C++20 (64) TESTS 33 109 1126400
241503854 Flyed D Jan. 13, 2024, 7:22 p.m. OK GNU C++20 (64) TESTS 33 109 1126400
241524816 minibin D Jan. 14, 2024, 4:11 a.m. OK Java 11 TESTS 33 421 11673600
241483335 KlayThompson11 D Jan. 13, 2024, 4:29 p.m. OK Java 11 TESTS 31 1013 6860800
241481368 _and_suffering D Jan. 13, 2024, 4:25 p.m. OK Java 11 TESTS 31 1356 3379200
241502131 IMP0STER D Jan. 13, 2024, 7 p.m. OK Java 11 TESTS 33 1965 0
241491336 shojin_pro D Jan. 13, 2024, 5:28 p.m. OK Java 11 TESTS 31 2932 229683200
241480371 Skypiea D Jan. 13, 2024, 4:23 p.m. OK Java 17 TESTS 31 3104 216473600
241493525 soumit915 D Jan. 13, 2024, 5:41 p.m. OK Java 21 TESTS 31 374 8089600
241488799 frey4 D Jan. 13, 2024, 5:16 p.m. OK Java 21 TESTS 31 716 20172800
241480841 danbanica D Jan. 13, 2024, 4:24 p.m. OK Java 21 TESTS 31 857 11878400
241498068 d2s2 D Jan. 13, 2024, 6:18 p.m. OK Java 21 TESTS 33 1216 19148800
241515659 Yousef_Badr D Jan. 13, 2024, 11:51 p.m. OK Java 21 TESTS 33 1356 16793600
241480482 invincible777 D Jan. 13, 2024, 4:23 p.m. OK Java 8 TESTS 31 670 9932800
241489796 formidablechief27 D Jan. 13, 2024, 5:21 p.m. OK Java 8 TESTS 31 1185 20275200
241481595 ideservebetter D Jan. 13, 2024, 4:26 p.m. OK Java 8 TESTS 31 1185 20275200
241515289 faresbadr316 D Jan. 13, 2024, 11:36 p.m. OK Java 8 TESTS 33 1247 15052800
241485683 xobe19 D Jan. 13, 2024, 4:34 p.m. OK Java 8 TESTS 31 1247 16793600
241519196 TCL D Jan. 14, 2024, 2:03 a.m. OK MS C++ 2017 TESTS 33 655 7270400
241492998 ahtoh_ D Jan. 13, 2024, 5:38 p.m. OK Node.js TESTS 31 2323 66252800
241485134 r57shell D Jan. 13, 2024, 4:33 p.m. OK PyPy 3-64 TESTS 31 280 24883200
241488606 mj1000j D Jan. 13, 2024, 5:16 p.m. OK PyPy 3-64 TESTS 31 296 22630400
241489131 VectorASD D Jan. 13, 2024, 5:17 p.m. OK PyPy 3-64 TESTS 31 327 22016000
241501489 Leeisateam D Jan. 13, 2024, 6:52 p.m. OK PyPy 3-64 TESTS 33 327 27443200
241501165 _Kee D Jan. 13, 2024, 6:48 p.m. OK PyPy 3-64 TESTS 33 327 28364800
241504587 teekaytai D Jan. 13, 2024, 7:32 p.m. OK PyPy 3-64 TESTS 33 343 23654400
241495598 ossau_guildo D Jan. 13, 2024, 5:56 p.m. OK PyPy 3-64 TESTS 33 343 26214400
241510725 VitalyKo D Jan. 13, 2024, 9:11 p.m. OK PyPy 3-64 TESTS 33 374 20992000
241495885 PROELECTRO444 D Jan. 13, 2024, 5:59 p.m. OK PyPy 3-64 TESTS 33 545 24268800
241517827 liupengsay D Jan. 14, 2024, 1:23 a.m. OK PyPy 3-64 TESTS 33 545 36454400
241505783 MehraSaurav D Jan. 13, 2024, 7:49 p.m. OK Python 3 TESTS 33 2729 190156800
241496592 liut D Jan. 13, 2024, 6:05 p.m. OK Rust 2021 TESTS 33 171 6553600
241520551 Spheniscine D Jan. 14, 2024, 2:37 a.m. OK Rust 2021 TESTS 33 202 4300800
241490329 Qumeric D Jan. 13, 2024, 5:23 p.m. OK Rust 2021 TESTS 31 202 10035200
241485541 TecTrixer D Jan. 13, 2024, 4:34 p.m. OK Rust 2021 TESTS 31 218 5324800

remove filters

Back to search problems