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
( 6870 ) D1 Set To Max (Easy Version) PROGRAMMING brute force constructive algorithms greedy

B'This is the easy 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 <= 1000 ) -- 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^2 over all test cases does not exceed 10^6 . 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
236563120 stupidnessplusplus D1 Dec. 9, 2023, 5:43 p.m. OK C# 8 TESTS 18 155 3481600
236602841 TermostatoEn24 D1 Dec. 10, 2023, 1:56 a.m. OK GNU C11 TESTS 20 46 3174400
236562156 pengin_2000 D1 Dec. 9, 2023, 5:40 p.m. OK GNU C11 TESTS 18 61 25702400
236602433 TermostatoEn24 D1 Dec. 10, 2023, 1:43 a.m. OK GNU C11 TESTS 20 78 2457600
236564289 mind_your_own_business D1 Dec. 9, 2023, 5:46 p.m. OK GNU C++14 TESTS 18 15 0
236563650 make_p_great_again D1 Dec. 9, 2023, 5:44 p.m. OK GNU C++14 TESTS 18 15 204800
236579277 vish_vesh D1 Dec. 9, 2023, 6:59 p.m. OK GNU C++14 TESTS 19 15 204800
236568212 azert9526 D1 Dec. 9, 2023, 5:57 p.m. OK GNU C++14 TESTS 18 15 204800
236567948 ILovveyyou D1 Dec. 9, 2023, 5:56 p.m. OK GNU C++14 TESTS 18 15 819200
236567835 raidencode D1 Dec. 9, 2023, 5:56 p.m. OK GNU C++14 TESTS 18 15 1638400
236562947 haiduy1711 D1 Dec. 9, 2023, 5:43 p.m. OK GNU C++14 TESTS 18 15 1740800
236563238 weng_zi D1 Dec. 9, 2023, 5:43 p.m. OK GNU C++14 TESTS 18 15 7987200
236570063 MegalovaniaJ D1 Dec. 9, 2023, 6:01 p.m. OK GNU C++14 TESTS 18 15 8601600
236605019 XHZS_XY D1 Dec. 10, 2023, 2:48 a.m. OK GNU C++14 TESTS 20 15 20070400
236563706 Ariful_Islam. D1 Dec. 9, 2023, 5:45 p.m. OK GNU C++17 TESTS 18 15 0
236578497 sitiy D1 Dec. 9, 2023, 6:52 p.m. OK GNU C++17 TESTS 19 15 0
236564931 chandvac D1 Dec. 9, 2023, 5:48 p.m. OK GNU C++17 TESTS 18 15 0
236592532 NanadaimeHokage D1 Dec. 9, 2023, 9:17 p.m. OK GNU C++17 TESTS 20 15 0
236566839 Nobita_Nobi D1 Dec. 9, 2023, 5:53 p.m. OK GNU C++17 TESTS 18 15 102400
236561478 Protochy D1 Dec. 9, 2023, 5:38 p.m. OK GNU C++17 TESTS 18 15 102400
236589175 Yoder2k4 D1 Dec. 9, 2023, 8:41 p.m. OK GNU C++17 TESTS 20 15 204800
236580673 skye_ D1 Dec. 9, 2023, 7:13 p.m. OK GNU C++17 TESTS 20 15 204800
236577853 Tuhil D1 Dec. 9, 2023, 6:46 p.m. OK GNU C++17 TESTS 19 15 204800
236593342 icchou233 D1 Dec. 9, 2023, 9:30 p.m. OK GNU C++17 TESTS 20 15 204800
236568904 rasesh_shetty D1 Dec. 9, 2023, 5:58 p.m. OK GNU C++17 (64) TESTS 18 15 0
236613447 rn201 D1 Dec. 10, 2023, 5:26 a.m. OK GNU C++17 (64) TESTS 20 15 0
236602510 enslaved D1 Dec. 10, 2023, 1:45 a.m. OK GNU C++17 (64) TESTS 20 15 0
236600470 Ioana D1 Dec. 10, 2023, 12:41 a.m. OK GNU C++17 (64) TESTS 20 15 0
236581105 TsotneSV D1 Dec. 9, 2023, 7:17 p.m. OK GNU C++17 (64) TESTS 20 15 0
236578137 pwnp D1 Dec. 9, 2023, 6:48 p.m. OK GNU C++17 (64) TESTS 19 15 0
236571239 Imran435 D1 Dec. 9, 2023, 6:04 p.m. OK GNU C++17 (64) TESTS 18 15 0
236565163 TJLG-fly D1 Dec. 9, 2023, 5:49 p.m. OK GNU C++17 (64) TESTS 18 15 0
236565585 walilili D1 Dec. 9, 2023, 5:50 p.m. OK GNU C++17 (64) TESTS 18 15 102400
236596725 rishit3234 D1 Dec. 9, 2023, 10:39 p.m. OK GNU C++17 (64) TESTS 20 15 102400
236613480 Miaowa333 D1 Dec. 10, 2023, 5:26 a.m. OK GNU C++20 (64) TESTS 20 15 0
236610688 AbeedShaik D1 Dec. 10, 2023, 4:42 a.m. OK GNU C++20 (64) TESTS 20 15 0
236610425 Ras_Vz D1 Dec. 10, 2023, 4:37 a.m. OK GNU C++20 (64) TESTS 20 15 0
236608516 Saptak3315 D1 Dec. 10, 2023, 4:01 a.m. OK GNU C++20 (64) TESTS 20 15 0
236614518 mrhga_incognito D1 Dec. 10, 2023, 5:41 a.m. OK GNU C++20 (64) TESTS 20 15 0
236605346 dhakad_239 D1 Dec. 10, 2023, 2:56 a.m. OK GNU C++20 (64) TESTS 20 15 0
236602852 jabbour.ralph D1 Dec. 10, 2023, 1:57 a.m. OK GNU C++20 (64) TESTS 20 15 0
236615137 hritikkumarrfj18 D1 Dec. 10, 2023, 5:48 a.m. OK GNU C++20 (64) TESTS 20 15 0
236606741 HoanggDuc D1 Dec. 10, 2023, 3:27 a.m. OK GNU C++20 (64) TESTS 20 15 0
236613688 HarshalHolkar D1 Dec. 10, 2023, 5:29 a.m. OK GNU C++20 (64) TESTS 20 15 0
236570502 mr_sparkle70 D1 Dec. 9, 2023, 6:02 p.m. OK Go TESTS 18 607 18841600
236615692 radianite2003 D1 Dec. 10, 2023, 5:55 a.m. OK Java 11 TESTS 20 233 0
236571148 dajeff D1 Dec. 9, 2023, 6:04 p.m. OK Java 11 TESTS 18 249 0
236564469 Utsav82 D1 Dec. 9, 2023, 5:47 p.m. OK Java 17 TESTS 18 202 512000
236606768 GaleStarr D1 Dec. 10, 2023, 3:27 a.m. OK Java 17 TESTS 20 218 204800
236563233 28leoleo28 D1 Dec. 9, 2023, 5:43 p.m. OK Java 17 TESTS 18 233 307200
236569515 NewbiePupil D1 Dec. 9, 2023, 6 p.m. OK Java 17 TESTS 18 248 204800
236566490 LeetCodeforces_Null D1 Dec. 9, 2023, 5:52 p.m. OK Java 21 TESTS 18 264 102400
236565376 Eslam_Ahmed D1 Dec. 9, 2023, 5:49 p.m. OK Java 21 TESTS 18 280 0
236561001 q2045891621. D1 Dec. 9, 2023, 5:37 p.m. OK Java 21 TESTS 18 280 0
236570609 SamyajitDas D1 Dec. 9, 2023, 6:02 p.m. OK Java 21 TESTS 18 296 0
236588141 Danger_Don D1 Dec. 9, 2023, 8:28 p.m. OK Java 8 TESTS 20 108 0
236576388 invincible777 D1 Dec. 9, 2023, 6:35 p.m. OK Java 8 TESTS 18 124 0
236561165 xobe19 D1 Dec. 9, 2023, 5:37 p.m. OK Java 8 TESTS 18 124 0
236587718 Sumitsingh7 D1 Dec. 9, 2023, 8:27 p.m. OK Java 8 TESTS 20 124 5836800
236563553 110101011 D1 Dec. 9, 2023, 5:44 p.m. OK Java 8 TESTS 18 139 0
236616032 nomadicjuggrnaut D1 Dec. 10, 2023, 5:59 a.m. OK Java 8 TESTS 20 156 0
236565283 Piashy D1 Dec. 9, 2023, 5:49 p.m. OK MS C++ 2017 TESTS 18 46 102400
236581056 skimono D1 Dec. 9, 2023, 7:16 p.m. OK MS C++ 2017 TESTS 20 78 204800
236586590 jvatsal0709 D1 Dec. 9, 2023, 8:21 p.m. OK PyPy 3 TESTS 20 233 9728000
236579824 lunchbox D1 Dec. 9, 2023, 7:04 p.m. OK PyPy 3 TESTS 19 498 9523200
236560891 Arpia D1 Dec. 9, 2023, 5:37 p.m. OK PyPy 3-64 TESTS 18 171 8806400
236566144 ayush_singh777 D1 Dec. 9, 2023, 5:51 p.m. OK PyPy 3-64 TESTS 18 186 9523200
236610873 zechri D1 Dec. 10, 2023, 4:45 a.m. OK PyPy 3-64 TESTS 20 187 9728000
236574240 DaniilKK D1 Dec. 9, 2023, 6:23 p.m. OK PyPy 3-64 TESTS 18 202 9420800
236611029 zechri D1 Dec. 10, 2023, 4:47 a.m. OK PyPy 3-64 TESTS 20 202 9830400
236585099 arurocks D1 Dec. 9, 2023, 8:02 p.m. OK PyPy 3-64 TESTS 20 202 10240000
236608693 Remineva D1 Dec. 10, 2023, 4:05 a.m. OK PyPy 3-64 TESTS 20 202 10444800
236599354 Sparkle_Twilight D1 Dec. 9, 2023, 11:59 p.m. OK PyPy 3-64 TESTS 20 217 9625600
236573144 AyuAnchor D1 Dec. 9, 2023, 6:18 p.m. OK PyPy 3-64 TESTS 18 217 9625600
236615428 abhaumik24 D1 Dec. 10, 2023, 5:52 a.m. OK PyPy 3-64 TESTS 20 218 9830400
236611689 kavyasaini D1 Dec. 10, 2023, 4:59 a.m. OK Python 3 TESTS 20 93 614400
236608747 Yarrachandrasekhar D1 Dec. 10, 2023, 4:06 a.m. OK Python 3 TESTS 20 93 716800
236582305 aayush_chhabra D1 Dec. 9, 2023, 7:31 p.m. OK Python 3 TESTS 20 109 921600
236572777 sh1ziku D1 Dec. 9, 2023, 6:17 p.m. OK Python 3 TESTS 18 155 204800
236564212 Luxy D1 Dec. 9, 2023, 5:46 p.m. OK Python 3 TESTS 18 327 921600
236608111 liut D1 Dec. 10, 2023, 3:54 a.m. OK Rust 2021 TESTS 20 15 0
236607491 liut D1 Dec. 10, 2023, 3:41 a.m. OK Rust 2021 TESTS 20 15 0
236569688 parasocial D1 Dec. 9, 2023, 6 p.m. OK Rust 2021 TESTS 18 15 0
236572865 kost D1 Dec. 9, 2023, 6:18 p.m. OK Rust 2021 TESTS 18 15 102400
236561380 kost D1 Dec. 9, 2023, 5:38 p.m. OK Rust 2021 TESTS 18 15 102400
236566191 naut3 D1 Dec. 9, 2023, 5:51 p.m. OK Rust 2021 TESTS 18 15 1331200
236609452 PeterlitsZo D1 Dec. 10, 2023, 4:19 a.m. OK Rust 2021 TESTS 20 77 512000
236571122 crisis627 D1 Dec. 9, 2023, 6:03 p.m. OK Rust 2021 TESTS 18 108 716800

remove filters

Back to search problems