Codeforces Round 754 (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
1605 Codeforces Round 754 (Div. 2) FINISHED False 7200 100452263 Nov. 12, 2021, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1071 ) E Array Equalizer PROGRAMMING binary search implementation math number theory sortings 2400

B'Jeevan has two arrays a and b of size n . He is fond of performing weird operations on arrays. This time, he comes up with two types of operations: He wants to convert array a into an array b using the minimum total number of operations. However, Jeevan seems to have forgotten the value of b_1 . So he makes some guesses. He will ask you q questions corresponding to his q guesses, the i -th of which is of the form: Help him by answering each question. The first line contains a single integer n (1 <= n <= 2 cdot 10^{5}) -- the size of arrays a and b . The second line contains n integers a_1, a_2, ..., a_n (1 <= a_i <= 10^6) . The third line contains n integers b_1, b_2, ..., b_n (1 <= b_i <= 10^6 for i neq 1 ; b_1 = -1 , representing that the value of b_1 is unknown ) . The fourth line contains a single integer q (1 <= q <= 2 cdot 10^{5}) -- the number of questions. Each of the following q lines contains a single integer x_i (1 <= x_i <= 10^6) -- representing the i -th question. Output q integers -- the answers to each of his q questions. Consider the first test case. [3, 7] xrightarrow[ text{decrease}]{ text{i = 1}} [2, 6] xrightarrow[ text{decrease}]{ text{i = 1}} [1, 5] Hence the answer is 2 . [3, 7] xrightarrow[ text{decrease}]{ text{i = 2}} [3, 6] xrightarrow[ text{decrease}]{ text{i = 2}} [3, 5] xrightarrow[ text{increase}]{ text{i = 1}} [4, 6] xrightarrow[ text{decrease}]{ text{i = 2}} [4, 5] Hence the answer is 4 . [3, 7] xrightarrow[ text{decrease}]{ text{i = 2}} [3, 6] xrightarrow[ text{decrease}]{ text{i = 2}} [3, 5] Hence the answer is 2 . '...

Tutorials

tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
135215782 Depth_First_Search E Nov. 13, 2021, 4:47 a.m. OK GNU C++14 TESTS 47 109 22220800 2400
135164593 SeiunSky E Nov. 12, 2021, 4:21 p.m. OK GNU C++14 TESTS 47 140 41267200 2400
135163431 happydef E Nov. 12, 2021, 4:19 p.m. OK GNU C++14 TESTS 47 155 32460800 2400
135207138 SAMSans E Nov. 13, 2021, 2:13 a.m. OK GNU C++14 TESTS 47 156 18329600 2400
135176499 YHT_CC E Nov. 12, 2021, 5:21 p.m. OK GNU C++14 TESTS 47 171 20787200 2400
135205872 jiangxuancheng E Nov. 13, 2021, 1:45 a.m. OK GNU C++14 TESTS 47 187 13004800 2400
135204075 luogu_bot0 E Nov. 13, 2021, 12:57 a.m. OK GNU C++14 TESTS 47 265 21913600 2400
135210100 KING_OF_TURTLE E Nov. 13, 2021, 3:08 a.m. OK GNU C++14 TESTS 47 265 30105600 2400
135166608 PsephurusGladius E Nov. 12, 2021, 4:26 p.m. OK GNU C++14 TESTS 47 280 8499200 2400
135206277 grass8cow E Nov. 13, 2021, 1:54 a.m. OK GNU C++14 TESTS 47 280 9932800 2400
135207823 acwing_meow E Nov. 13, 2021, 2:27 a.m. OK GNU C++17 TESTS 47 234 7475200 2400
135220022 Hau E Nov. 13, 2021, 5:41 a.m. OK GNU C++17 TESTS 47 264 21913600 2400
135166706 OIer_kzc E Nov. 12, 2021, 4:26 p.m. OK GNU C++17 TESTS 47 265 7475200 2400
135215681 _Ruri_ E Nov. 13, 2021, 4:45 a.m. OK GNU C++17 TESTS 47 265 9318400 2400
135174208 cosmicminh E Nov. 12, 2021, 5:07 p.m. OK GNU C++17 TESTS 47 295 14028800 2400
135165735 WolfBlue E Nov. 12, 2021, 4:24 p.m. OK GNU C++17 TESTS 47 295 24371200 2400
135217584 MollyXu E Nov. 13, 2021, 5:12 a.m. OK GNU C++17 TESTS 47 295 29081600 2400
135174226 ButterflyDew E Nov. 12, 2021, 5:07 p.m. OK GNU C++17 TESTS 47 296 14336000 2400
135202317 fxhd E Nov. 13, 2021, midnight OK GNU C++17 TESTS 47 296 26624000 2400
135180234 AlexXan312 E Nov. 12, 2021, 5:49 p.m. OK GNU C++17 TESTS 47 296 30720000 2400
135173001 Lucina E Nov. 12, 2021, 5 p.m. OK GNU C++17 (64) TESTS 47 171 26214400 2400
135173913 Lucina E Nov. 12, 2021, 5:05 p.m. OK GNU C++17 (64) TESTS 47 186 18124800 2400
135181881 yugurt E Nov. 12, 2021, 6:03 p.m. OK GNU C++17 (64) TESTS 47 186 23654400 2400
135211615 haruki_K E Nov. 13, 2021, 3:36 a.m. OK GNU C++17 (64) TESTS 47 187 9420800 2400
135175630 WeakestTopology E Nov. 12, 2021, 5:15 p.m. OK GNU C++17 (64) TESTS 47 187 12492800 2400
135170286 OleschY E Nov. 12, 2021, 4:34 p.m. OK GNU C++17 (64) TESTS 47 187 13926400 2400
135175129 Lucina E Nov. 12, 2021, 5:12 p.m. OK GNU C++17 (64) TESTS 47 187 18124800 2400
135177139 Lucina E Nov. 12, 2021, 5:26 p.m. OK GNU C++17 (64) TESTS 47 187 18124800 2400
135165873 yuji9511 E Nov. 12, 2021, 4:24 p.m. OK GNU C++17 (64) TESTS 47 187 25088000 2400
135199171 Tovarisch E Nov. 12, 2021, 10:14 p.m. OK GNU C++17 (64) TESTS 47 187 41267200 2400
135197615 JovanB E Nov. 12, 2021, 9:34 p.m. OK GNU C++20 (64) TESTS 47 140 25292800 2400
135186405 777 E Nov. 12, 2021, 6:44 p.m. OK GNU C++20 (64) TESTS 47 155 10956800 2400
135172347 hat E Nov. 12, 2021, 4:58 p.m. OK GNU C++20 (64) TESTS 47 155 11980800 2400
135204314 kal013 E Nov. 13, 2021, 1:04 a.m. OK GNU C++20 (64) TESTS 47 156 9216000 2400
135208870 HollwoQ_Pelw E Nov. 13, 2021, 2:46 a.m. OK GNU C++20 (64) TESTS 47 156 10854400 2400
135178668 S2speed E Nov. 12, 2021, 5:37 p.m. OK GNU C++20 (64) TESTS 47 156 18227200 2400
135168283 SpadeZ E Nov. 12, 2021, 4:30 p.m. OK GNU C++20 (64) TESTS 47 171 10137600 2400
135208555 wty2016 E Nov. 13, 2021, 2:41 a.m. OK GNU C++20 (64) TESTS 47 171 10240000 2400
135165811 misaka18931 E Nov. 12, 2021, 4:24 p.m. OK GNU C++20 (64) TESTS 47 171 18124800 2400
135167518 HNO2 E Nov. 12, 2021, 4:28 p.m. OK GNU C++20 (64) TESTS 47 171 20377600 2400
135182844 knightL E Nov. 12, 2021, 6:11 p.m. OK Java 11 TESTS 47 436 47308800 2400
135172249 kencho8128 E Nov. 12, 2021, 4:57 p.m. OK Java 11 TESTS 47 467 59187200 2400
135175459 Frank0628 E Nov. 12, 2021, 5:14 p.m. OK Java 8 TESTS 47 889 52428800 2400
135172409 Eldies E Nov. 12, 2021, 4:58 p.m. OK MS C++ 2017 TESTS 47 1450 7884800 2400
135175202 mban259 E Nov. 12, 2021, 5:12 p.m. OK .NET Core C# TESTS 47 296 52633600 2400
135187475 NecroSean38 E Nov. 12, 2021, 6:56 p.m. OK PyPy 3 TESTS 47 795 84070400 2400
135187543 NecroSean38 E Nov. 12, 2021, 6:57 p.m. OK PyPy 3 TESTS 47 826 61132800 2400
135209217 whatshisbucket E Nov. 13, 2021, 2:52 a.m. OK PyPy 3 TESTS 47 1279 48742400 2400
135173044 codicon E Nov. 12, 2021, 5 p.m. OK PyPy 3 TESTS 47 1403 178483200 2400
135187466 hxu10 E Nov. 12, 2021, 6:56 p.m. OK PyPy 3 TESTS 47 1762 95641600 2400
135173003 codicon E Nov. 12, 2021, 5 p.m. OK PyPy 3-64 TESTS 47 904 183296000 2400
135215445 coolstreaming E Nov. 13, 2021, 4:41 a.m. OK PyPy 3-64 TESTS 47 1044 59392000 2400
135172395 codicon E Nov. 12, 2021, 4:58 p.m. OK PyPy 3-64 TESTS 47 1060 172646400 2400
135195152 manish.17 E Nov. 12, 2021, 8:45 p.m. OK PyPy 3-64 TESTS 47 1419 157081600 2400
135187703 hxu10 E Nov. 12, 2021, 6:59 p.m. OK PyPy 3-64 TESTS 47 1871 170291200 2400
135165490 sansen E Nov. 12, 2021, 4:23 p.m. OK Rust TESTS 47 202 23142400 2400

remove filters

Back to search problems