Codeforces Round 914 (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
1904 Codeforces Round 914 (Div. 2) FINISHED False 7200 29685299 Dec. 9, 2023, 4:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 4500 ) D2 Set To Max (Hard Version) PROGRAMMING binary search constructive algorithms data structures ds greedy implementation sortings two pointers

B'This is the hard version of the problem. The only differences between the two versions of this problem are the constraints on n and the time limit. You can make hacks only if all versions of the problem are solved. You are given two arrays a and b of length n . You can perform the following operation some (possibly zero) times: Determine if you can make array a equal to array b . Each test contains multiple test cases. The first line contains an integer t ( 1 <= q t <= q 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 length of the arrays. The second line contains n integers a_1, a_2, ldots, a_n ( 1 <= a_i <= n ) -- the elements of array a . The third line contains n integers b_1, b_2, ldots, b_n ( 1 <= b_i <= n ) -- the elements of array b . It is guaranteed that the sum of n over all test cases does not exceed 2 cdot 10^5 . For each test case, output "YES" (without quotes) if you can make a into b using any number of operations, and "NO" (without quotes) otherwise. You can output "YES" and "NO" in any case (for example, strings "yES", "yes" and "Yes" will be recognized as a positive response). In the first test case, we can achieve array b by applying a single operation: (l,r)=(2,3) . In the second test case, it can be shown we cannot achieve array b in any amount of operations. In the third test case, we can achieve array b by applying two operations: (l,r)=(2,5) . followed by (l,r)=(1,3) . In the fourth and fifth test cases, it can be shown we cannot achieve array b in any amount of operations. '...

Tutorials

Codeforces Round 914 (Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
236562082 pengin_2000 D2 Dec. 9, 2023, 5:40 p.m. OK GNU C11 TESTS 20 1715 25702400
236568814 Raul_A D2 Dec. 9, 2023, 5:58 p.m. OK GNU C++14 TESTS 20 108 1638400
236579366 vish_vesh D2 Dec. 9, 2023, 7 p.m. OK GNU C++14 TESTS 22 109 3174400
236573294 Per12345 D2 Dec. 9, 2023, 6:19 p.m. OK GNU C++14 TESTS 20 124 12288000
236610443 GAPter D2 Dec. 10, 2023, 4:37 a.m. OK GNU C++14 TESTS 26 140 5427200
236606141 lyc1001 D2 Dec. 10, 2023, 3:14 a.m. OK GNU C++14 TESTS 25 140 11264000
236606150 luogu_bot1 D2 Dec. 10, 2023, 3:14 a.m. OK GNU C++14 TESTS 25 140 11264000
236576199 mwzqwq D2 Dec. 9, 2023, 6:34 p.m. OK GNU C++14 TESTS 20 140 12390400
236570982 raidencode D2 Dec. 9, 2023, 6:03 p.m. OK GNU C++14 TESTS 20 140 16076800
236562582 Abdo-Saad D2 Dec. 9, 2023, 5:41 p.m. OK GNU C++14 TESTS 20 155 12697600
236570101 mind_your_own_business D2 Dec. 9, 2023, 6:01 p.m. OK GNU C++14 TESTS 20 171 6451200
236581471 chennie D2 Dec. 9, 2023, 7:21 p.m. OK GNU C++17 TESTS 24 93 1638400
236578734 chennie D2 Dec. 9, 2023, 6:54 p.m. OK GNU C++17 TESTS 21 93 2457600
236582144 havegoodnight D2 Dec. 9, 2023, 7:29 p.m. OK GNU C++17 TESTS 24 93 2560000
236610829 eysbutno D2 Dec. 10, 2023, 4:44 a.m. OK GNU C++17 TESTS 26 93 2662400
236570631 LinXce D2 Dec. 9, 2023, 6:02 p.m. OK GNU C++17 TESTS 20 108 2560000
236575804 aditya_neer D2 Dec. 9, 2023, 6:31 p.m. OK GNU C++17 TESTS 20 109 2662400
236569576 umezo D2 Dec. 9, 2023, 6 p.m. OK GNU C++17 TESTS 20 109 4812800
236564902 Chris_Brown D2 Dec. 9, 2023, 5:48 p.m. OK GNU C++17 TESTS 20 109 4812800
236578273 edwardnvv57k D2 Dec. 9, 2023, 6:50 p.m. OK GNU C++17 TESTS 21 109 4812800
236598666 yash_9a3b D2 Dec. 9, 2023, 11:34 p.m. OK GNU C++17 TESTS 25 109 6144000
236571452 fullmetal D2 Dec. 9, 2023, 6:04 p.m. OK GNU C++17 (64) TESTS 20 77 6758400
236562758 wuyin331 D2 Dec. 9, 2023, 5:42 p.m. OK GNU C++17 (64) TESTS 20 78 8089600
236568534 muxiuyulin D2 Dec. 9, 2023, 5:57 p.m. OK GNU C++17 (64) TESTS 20 78 9625600
236573426 HMayuri D2 Dec. 9, 2023, 6:19 p.m. OK GNU C++17 (64) TESTS 20 78 11468800
236601929 MIKEFENG D2 Dec. 10, 2023, 1:28 a.m. OK GNU C++17 (64) TESTS 25 78 27545600
236567850 augtheo D2 Dec. 9, 2023, 5:56 p.m. OK GNU C++17 (64) TESTS 20 93 3276800
236564518 SSRS_ D2 Dec. 9, 2023, 5:47 p.m. OK GNU C++17 (64) TESTS 20 93 10854400
236602822 enslaved D2 Dec. 10, 2023, 1:55 a.m. OK GNU C++17 (64) TESTS 25 93 38195200
236575091 TJLG-fly D2 Dec. 9, 2023, 6:28 p.m. OK GNU C++17 (64) TESTS 20 109 2457600
236574759 Oinng D2 Dec. 9, 2023, 6:26 p.m. OK GNU C++17 (64) TESTS 20 124 7987200
236572881 ApuYe D2 Dec. 9, 2023, 6:18 p.m. OK GNU C++20 (64) TESTS 20 46 3174400
236574158 DuckIsHere D2 Dec. 9, 2023, 6:23 p.m. OK GNU C++20 (64) TESTS 20 46 3276800
236576717 Itadori_yuji_007 D2 Dec. 9, 2023, 6:38 p.m. OK GNU C++20 (64) TESTS 20 61 3174400
236578694 CHROMIUM00 D2 Dec. 9, 2023, 6:54 p.m. OK GNU C++20 (64) TESTS 21 62 1638400
236577501 WhimsicalCode D2 Dec. 9, 2023, 6:44 p.m. OK GNU C++20 (64) TESTS 20 62 1638400
236566362 RAVIwaves D2 Dec. 9, 2023, 5:52 p.m. OK GNU C++20 (64) TESTS 20 62 1638400
236564832 ETL D2 Dec. 9, 2023, 5:48 p.m. OK GNU C++20 (64) TESTS 20 62 1638400
236566101 Bacily D2 Dec. 9, 2023, 5:51 p.m. OK GNU C++20 (64) TESTS 20 62 2355200
236569151 alaevS D2 Dec. 9, 2023, 5:59 p.m. OK GNU C++20 (64) TESTS 20 62 2457600
236599824 LLGM D2 Dec. 10, 2023, 12:16 a.m. OK GNU C++20 (64) TESTS 25 62 2457600
236607904 profchi D2 Dec. 10, 2023, 3:50 a.m. OK Java 11 TESTS 25 1201 129638400
236571268 dajeff D2 Dec. 9, 2023, 6:04 p.m. OK Java 11 TESTS 20 1279 85196800
236569396 NewbiePupil D2 Dec. 9, 2023, 6 p.m. OK Java 17 TESTS 20 826 81203200
236575509 Utsav82 D2 Dec. 9, 2023, 6:30 p.m. OK Java 17 TESTS 20 1153 80896000
236581504 28leoleo28 D2 Dec. 9, 2023, 7:21 p.m. OK Java 17 TESTS 24 2573 51507200
236561113 q2045891621. D2 Dec. 9, 2023, 5:37 p.m. OK Java 21 TESTS 20 795 80896000
236568022 Eslam_Ahmed D2 Dec. 9, 2023, 5:56 p.m. OK Java 21 TESTS 20 826 49459200
236614535 Danger_Don D2 Dec. 10, 2023, 5:41 a.m. OK Java 8 TESTS 26 467 53350400
236614481 dhruvinsavla.159 D2 Dec. 10, 2023, 5:40 a.m. OK Java 8 TESTS 26 467 53350400
236576336 invincible777 D2 Dec. 9, 2023, 6:35 p.m. OK Java 8 TESTS 20 545 86528000
236563100 vijay_panwar12 D2 Dec. 9, 2023, 5:43 p.m. OK Java 8 TESTS 20 546 27340800
236563623 110101011 D2 Dec. 9, 2023, 5:44 p.m. OK Java 8 TESTS 20 701 72908800
236568930 Sergey.Bankevich D2 Dec. 9, 2023, 5:58 p.m. OK Kotlin 1.7 TESTS 20 592 125235200
236564478 jvmusin D2 Dec. 9, 2023, 5:47 p.m. OK Kotlin 1.7 TESTS 20 2214 170598400
236572935 jvmusin D2 Dec. 9, 2023, 6:18 p.m. OK Kotlin 1.7 TESTS 20 2277 205619200
236562024 Tor_250 D2 Dec. 9, 2023, 5:40 p.m. OK MS C++ 2017 TESTS 20 358 20377600
236581072 skimono D2 Dec. 9, 2023, 7:16 p.m. OK MS C++ 2017 TESTS 24 420 41779200
236570116 Piashy D2 Dec. 9, 2023, 6:01 p.m. OK MS C++ 2017 TESTS 20 420 64204800
236579805 lunchbox D2 Dec. 9, 2023, 7:04 p.m. OK PyPy 3 TESTS 23 545 25907200
236604001 lisashi D2 Dec. 10, 2023, 2:25 a.m. OK PyPy 3 TESTS 25 826 34099200
236599349 Sparkle_Twilight D2 Dec. 9, 2023, 11:59 p.m. OK PyPy 3-64 TESTS 25 265 33689600
236589024 yaroslav_pos D2 Dec. 9, 2023, 8:39 p.m. OK PyPy 3-64 TESTS 25 265 33689600
236573201 AyuAnchor D2 Dec. 9, 2023, 6:18 p.m. OK PyPy 3-64 TESTS 20 265 33689600
236573993 Arpia D2 Dec. 9, 2023, 6:23 p.m. OK PyPy 3-64 TESTS 20 280 30822400
236576346 athvasingh34568 D2 Dec. 9, 2023, 6:35 p.m. OK PyPy 3-64 TESTS 20 296 31539200
236565745 Shri_874 D2 Dec. 9, 2023, 5:50 p.m. OK PyPy 3-64 TESTS 20 311 33177600
236603354 minhnguyen13082003 D2 Dec. 10, 2023, 2:10 a.m. OK PyPy 3-64 TESTS 25 467 33894400
236569277 mukeremali D2 Dec. 9, 2023, 5:59 p.m. OK PyPy 3-64 TESTS 20 483 33177600
236566458 dabbler1 D2 Dec. 9, 2023, 5:52 p.m. OK PyPy 3-64 TESTS 20 498 37990400
236566546 ankan2526 D2 Dec. 9, 2023, 5:52 p.m. OK PyPy 3-64 TESTS 20 514 189337600
236571433 parasocial D2 Dec. 9, 2023, 6:04 p.m. OK Rust 2021 TESTS 20 31 6348800
236612688 liut D2 Dec. 10, 2023, 5:14 a.m. OK Rust 2021 TESTS 26 124 82534400
236561222 andrey.m D2 Dec. 9, 2023, 5:38 p.m. OK Rust 2021 TESTS 20 296 37068800
236561583 PugachAG D2 Dec. 9, 2023, 5:39 p.m. OK Rust 2021 TESTS 20 1387 32153600

remove filters

Back to search problems