Codeforces Round 600 (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
1253 Codeforces Round 600 (Div. 2) FINISHED False 7200 157908299 Nov. 16, 2019, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 18104 ) A Single Push PROGRAMMING implementation 1000

B'You 're given two arrays a[1 ... n] and b[1 ... n] , both of the same length n . In order to perform a push operation, you have to choose three integers l, r, k satisfying 1 <= l <= r <= n and k > 0 . Then, you will add k to elements a_l, a_{l+1}, ldots, a_r . For example, if a = [3, 7, 1, 4, 1, 2] and you choose (l = 3, r = 5, k = 2) , the array a will become [3, 7, underline{3, 6, 3}, 2] . You can do this operation at most once. Can you make array a equal to array b ? (We consider that a = b if and only if, for every 1 <= i <= n , a_i = b_i ) The first line contains a single integer t ( 1 <= t <= 20 ) -- the number of test cases in the input. The first line of each test case contains a single integer n ( 1 <= n <= 100 000 ) -- the number of elements in each array. The second line of each test case contains n integers a_1, a_2, ldots, a_n ( 1 <= a_i <= 1000 ). The third line of each test case contains n integers b_1, b_2, ldots, b_n ( 1 <= b_i <= 1000 ). It is guaranteed that the sum of n over all test cases doesn 't exceed 10^5 . For each test case, output one line containing "YES" if it 's possible to make arrays a and b equal by performing at most once the described operation or "NO" if it 's impossible. You can print each letter in any case (upper or lower). The first test case is described in the statement: we can perform a push operation with parameters (l=3, r=5, k=2) to make a equal to b . In the second test case, we would need at least two operations to make a equal to b . In the third test case, arrays a and b are already equal. In the fourth test case, it 's impossible to make a equal to b , because the integer k has to be positive. '...

Tutorials

Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
65237549 KingsNeverDie A Nov. 17, 2019, 7:48 a.m. OK Clang++17 Diagnostics TESTS 57 93 1536000 1000
65328228 lumisphere902 A Nov. 19, 2019, 3:41 a.m. OK Clang++17 Diagnostics TESTS 57 655 6246400 1000
65365176 avenio99 A Nov. 19, 2019, 3:11 p.m. OK Clang++17 Diagnostics TESTS 57 795 18841600 1000
65210497 ruban A Nov. 16, 2019, 5:50 p.m. OK Delphi TESTS 57 61 39526400 1000
66288595 p3rfect A Dec. 4, 2019, 8:38 p.m. OK FPC TESTS 57 62 819200 1000
65559862 ghosthunterk A Nov. 23, 2019, 2:08 a.m. OK FPC TESTS 57 62 16281600 1000
66816633 Prem1802065p A Dec. 14, 2019, 6:02 a.m. OK GNU C11 TESTS 57 46 819200 1000
66557962 vjudge5 A Dec. 9, 2019, 5:38 p.m. OK GNU C11 TESTS 57 46 819200 1000
65616626 aaryanjagetia A Nov. 24, 2019, 4:03 a.m. OK GNU C11 TESTS 57 46 819200 1000
65217885 Shakib_SRK1 A Nov. 16, 2019, 7:20 p.m. OK GNU C11 TESTS 57 46 819200 1000
65217940 Shakib_SRK A Nov. 16, 2019, 7:22 p.m. OK GNU C11 TESTS 57 46 819200 1000
65218431 Jassi16 A Nov. 16, 2019, 7:34 p.m. OK GNU C11 TESTS 57 46 819200 1000
65219636 samay_kothari A Nov. 16, 2019, 8:07 p.m. OK GNU C11 TESTS 57 46 819200 1000
65264336 n0.0b A Nov. 17, 2019, 4:14 p.m. OK GNU C11 TESTS 57 46 819200 1000
65281157 ShuvoMalakar A Nov. 18, 2019, 5:47 a.m. OK GNU C11 TESTS 57 46 819200 1000
65484401 vjudge3 A Nov. 21, 2019, 12:47 p.m. OK GNU C11 TESTS 57 46 819200 1000
65278979 Heartbeat666 A Nov. 18, 2019, 4:08 a.m. OK GNU C++11 TESTS 57 31 409600 1000
65422626 2016c01 A Nov. 20, 2019, 9:30 a.m. OK GNU C++11 TESTS 57 31 614400 1000
65298747 Luvwgyx A Nov. 18, 2019, 12:29 p.m. OK GNU C++11 TESTS 57 31 716800 1000
65248783 fnoigsh A Nov. 17, 2019, 11:22 a.m. OK GNU C++11 TESTS 57 31 716800 1000
65934187 yuzhechuan A Nov. 29, 2019, 12:03 a.m. OK GNU C++11 TESTS 57 31 819200 1000
66630778 shengzihang A Dec. 11, 2019, 11:05 a.m. OK GNU C++11 TESTS 57 31 819200 1000
65421127 KaiserYang A Nov. 20, 2019, 8:57 a.m. OK GNU C++11 TESTS 57 31 819200 1000
65563561 drlo code_ccf founder_path A Nov. 23, 2019, 4:40 a.m. OK GNU C++11 TESTS 57 31 819200 1000
65713613 Youngsc A Nov. 25, 2019, 3:28 p.m. OK GNU C++11 TESTS 57 31 819200 1000
65559562 vjudge4 A Nov. 23, 2019, 1:55 a.m. OK GNU C++11 TESTS 57 31 1228800 1000
65221076 rajajyotiraditya A Nov. 16, 2019, 8:55 p.m. OK GNU C++14 TESTS 57 31 819200 1000
65210541 tokitsukaze A Nov. 16, 2019, 5:50 p.m. OK GNU C++14 TESTS 57 31 1740800 1000
65233761 BeNoble A Nov. 17, 2019, 6:20 a.m. OK GNU C++14 TESTS 57 31 3072000 1000
65279068 dtc03012 A Nov. 18, 2019, 4:12 a.m. OK GNU C++14 TESTS 57 46 409600 1000
65606468 wleung_bvg A Nov. 23, 2019, 9:04 p.m. OK GNU C++14 TESTS 57 46 921600 1000
65276669 angrysqrt3 A Nov. 18, 2019, 1:56 a.m. OK GNU C++14 TESTS 57 46 1228800 1000
66635730 vjudge3 A Dec. 11, 2019, 12:51 p.m. OK GNU C++14 TESTS 57 61 409600 1000
68351196 Perdente A Jan. 7, 2020, 9:56 a.m. OK GNU C++14 TESTS 57 61 614400 1000
65332488 dolphin1999 A Nov. 19, 2019, 7:05 a.m. OK GNU C++14 TESTS 57 61 819200 1000
65946827 WrongAnswer67 A Nov. 29, 2019, 9:03 a.m. OK GNU C++14 TESTS 57 61 819200 1000
66269376 .tx A Dec. 4, 2019, 11:44 a.m. OK GNU C++17 TESTS 57 31 819200 1000
65903895 yuruhiya A Nov. 28, 2019, 10:01 a.m. OK GNU C++17 TESTS 57 31 819200 1000
65260826 ioyeoa A Nov. 17, 2019, 2:59 p.m. OK GNU C++17 TESTS 57 31 819200 1000
65480776 vjudge2 A Nov. 21, 2019, 11:37 a.m. OK GNU C++17 TESTS 57 46 409600 1000
65225164 thtsshz_bgwrswh A Nov. 17, 2019, 1:04 a.m. OK GNU C++17 TESTS 57 46 819200 1000
65350948 qeryuo612 A Nov. 19, 2019, 2:21 p.m. OK GNU C++17 TESTS 57 46 819200 1000
65403350 Kissheart A Nov. 20, 2019, 12:57 a.m. OK GNU C++17 TESTS 57 46 819200 1000
65690282 buckypark A Nov. 25, 2019, 4:17 a.m. OK GNU C++17 TESTS 57 46 819200 1000
66557882 vjudge1 A Dec. 9, 2019, 5:36 p.m. OK GNU C++17 TESTS 57 46 819200 1000
65229980 Funny_digit A Nov. 17, 2019, 4:23 a.m. OK GNU C++17 TESTS 57 46 819200 1000
68961840 amarjeetanand A Jan. 17, 2020, 1:44 a.m. OK Go TESTS 57 62 0 1000
68063087 u1s1reallycai A Jan. 2, 2020, 5:53 a.m. OK Go TESTS 57 124 0 1000
67659636 cribabby A Dec. 26, 2019, 3:16 p.m. OK Java 11 TESTS 57 186 0 1000
65221704 Anonymous A Nov. 16, 2019, 9:20 p.m. OK Java 11 TESTS 57 187 0 1000
65327257 ssikikik A Nov. 19, 2019, 2:49 a.m. OK Java 11 TESTS 57 202 0 1000
65319949 findim A Nov. 18, 2019, 7:10 p.m. OK Java 11 TESTS 57 202 0 1000
66484774 satya_p54 A Dec. 8, 2019, 5:44 a.m. OK Java 11 TESTS 57 217 0 1000
67666849 nick_301 A Dec. 26, 2019, 6:14 p.m. OK Java 11 TESTS 57 217 0 1000
65211274 serafimkoo A Nov. 16, 2019, 5:59 p.m. OK Java 11 TESTS 57 217 0 1000
69933530 alankritanand001 A Feb. 1, 2020, 2:07 a.m. OK Java 11 TESTS 57 218 0 1000
65324190 Ellie_K A Nov. 18, 2019, 10:41 p.m. OK Java 11 TESTS 57 218 0 1000
65235828 Botzki17 A Nov. 17, 2019, 7:10 a.m. OK Java 11 TESTS 57 218 0 1000
65247994 luchy0120 A Nov. 17, 2019, 11:06 a.m. OK Java 8 TESTS 57 109 0 1000
67022673 jakejase2 A Dec. 16, 2019, 1:26 p.m. OK Java 8 TESTS 57 124 0 1000
66516515 spectre009 romit17 A Dec. 8, 2019, 7:12 p.m. OK Java 8 TESTS 57 124 0 1000
66380715 Mann_27__ A Dec. 6, 2019, 5:28 a.m. OK Java 8 TESTS 57 124 0 1000
66014858 johnny16 A Nov. 30, 2019, 4:53 a.m. OK Java 8 TESTS 57 124 0 1000
65623897 demigodprabh A Nov. 24, 2019, 7:12 a.m. OK Java 8 TESTS 57 124 0 1000
65332368 mufaddalnaya A Nov. 19, 2019, 7:01 a.m. OK Java 8 TESTS 57 124 0 1000
65298055 Bhavya_Arora A Nov. 18, 2019, 12:15 p.m. OK Java 8 TESTS 57 124 0 1000
65289243 pramodhosahalli A Nov. 18, 2019, 9:13 a.m. OK Java 8 TESTS 57 124 0 1000
65277333 beginner1010 A Nov. 18, 2019, 2:37 a.m. OK Java 8 TESTS 57 124 0 1000
65313134 shenqi16 A Nov. 18, 2019, 4:08 p.m. OK Kotlin TESTS 57 156 0 1000
65574572 shenqi16 A Nov. 23, 2019, 8:57 a.m. OK Kotlin TESTS 57 170 0 1000
65258416 Spheniscine A Nov. 17, 2019, 2:12 p.m. OK Kotlin TESTS 57 171 0 1000
65217472 AsuraPro A Nov. 16, 2019, 7:10 p.m. OK Kotlin TESTS 57 280 6041600 1000
65274199 Black_Fregat A Nov. 17, 2019, 10:24 p.m. OK Kotlin TESTS 57 280 7475200 1000
65307317 IsTinG A Nov. 18, 2019, 3:23 p.m. OK Kotlin TESTS 57 312 8089600 1000
65302191 ivanshubin A Nov. 18, 2019, 1:38 p.m. OK Kotlin TESTS 57 326 0 1000
65262065 Ash3008Kr A Nov. 17, 2019, 3:23 p.m. OK Kotlin TESTS 57 327 1024000 1000
66054099 GusztavSzmolik A Nov. 30, 2019, 6:49 p.m. OK Mono C# TESTS 57 93 10137600 1000
65260495 azukun A Nov. 17, 2019, 2:53 p.m. OK Mono C# TESTS 57 108 11264000 1000
65478957 nastya1199 A Nov. 21, 2019, 11:04 a.m. OK Mono C# TESTS 57 109 7475200 1000
65220547 m1_k3 A Nov. 16, 2019, 8:36 p.m. OK Mono C# TESTS 57 124 5836800 1000
68987090 TheThing A Jan. 17, 2020, 12:53 p.m. OK Mono C# TESTS 57 124 17510400 1000
66299781 shohag_16030 A Dec. 5, 2019, 6:35 a.m. OK Mono C# TESTS 57 140 17510400 1000
65528562 vjudge1 A Nov. 22, 2019, 11:28 a.m. OK MS C++ TESTS 57 46 409600 1000
65733585 vjudge4 A Nov. 26, 2019, 6:34 a.m. OK MS C++ TESTS 57 46 409600 1000
65389947 XanaxAY A Nov. 19, 2019, 4:57 p.m. OK MS C++ TESTS 57 46 819200 1000
66784421 vjudge2 A Dec. 13, 2019, 1:09 p.m. OK MS C++ TESTS 57 46 819200 1000
65346554 RJ0928 A Nov. 19, 2019, 12:48 p.m. OK MS C++ TESTS 57 46 819200 1000
66781812 vjudge1 A Dec. 13, 2019, 12:17 p.m. OK MS C++ TESTS 57 46 819200 1000
65529151 vjudge3 A Nov. 22, 2019, 11:43 a.m. OK MS C++ TESTS 57 46 819200 1000
65495612 vjudge4 A Nov. 21, 2019, 4:27 p.m. OK MS C++ TESTS 57 46 819200 1000
65492499 vjudge5 A Nov. 21, 2019, 3:15 p.m. OK MS C++ TESTS 57 46 819200 1000
65477835 vjudge2 A Nov. 21, 2019, 10:43 a.m. OK MS C++ TESTS 57 46 819200 1000
65488726 PapaGendu A Nov. 21, 2019, 1:47 p.m. OK MS C++ 2017 TESTS 57 77 409600 1000
65483563 vjudge3 A Nov. 21, 2019, 12:29 p.m. OK MS C++ 2017 TESTS 57 77 819200 1000
65561220 vjudge4 A Nov. 23, 2019, 3:01 a.m. OK MS C++ 2017 TESTS 57 77 819200 1000
65227395 1813004846 A Nov. 17, 2019, 2:43 a.m. OK MS C++ 2017 TESTS 57 77 1228800 1000
65474685 mckm2000 A Nov. 21, 2019, 9:34 a.m. OK MS C++ 2017 TESTS 57 77 1228800 1000
65560148 vjudge2 A Nov. 23, 2019, 2:19 a.m. OK MS C++ 2017 TESTS 57 78 819200 1000
65908250 529886336 A Nov. 28, 2019, 11:53 a.m. OK MS C++ 2017 TESTS 57 78 819200 1000
66012985 hdastudent A Nov. 30, 2019, 3:46 a.m. OK MS C++ 2017 TESTS 57 78 819200 1000
65295197 cheng222 A Nov. 18, 2019, 11:12 a.m. OK MS C++ 2017 TESTS 57 78 1024000 1000
65524038 iiopopoii A Nov. 22, 2019, 9:35 a.m. OK MS C++ 2017 TESTS 57 78 1024000 1000
65240736 aaafgcfg A Nov. 17, 2019, 8:41 a.m. OK Node.js TESTS 57 311 30310400 1000
66242491 Saroupille A Dec. 3, 2019, 6:45 p.m. OK Ocaml TESTS 57 77 7577600 1000
65269827 CrazyDr A Nov. 17, 2019, 7:06 p.m. OK PHP TESTS 57 92 14643200 1000
66497476 Kiral55 A Dec. 8, 2019, 11:08 a.m. OK PHP TESTS 57 93 14745600 1000
65218404 mayakin A Nov. 16, 2019, 7:34 p.m. OK PHP TESTS 57 124 26931200 1000
65852744 blueApple12 A Nov. 27, 2019, 2:53 p.m. OK PyPy 2 TESTS 57 171 9420800 1000
65556244 yumtam A Nov. 22, 2019, 10:07 p.m. OK PyPy 2 TESTS 57 171 10649600 1000
65279304 zdbtxdy A Nov. 18, 2019, 4:25 a.m. OK PyPy 2 TESTS 57 186 7884800 1000
65470453 SoSooding A Nov. 21, 2019, 8:11 a.m. OK PyPy 2 TESTS 57 202 10547200 1000
65923345 Madhur1906 A Nov. 28, 2019, 5:12 p.m. OK PyPy 2 TESTS 57 249 10444800 1000
67389117 Mkay6122 A Dec. 21, 2019, 6:58 p.m. OK PyPy 3 TESTS 57 218 12902400 1000
65720137 smoke_bellew A Nov. 25, 2019, 6:37 p.m. OK PyPy 3 TESTS 57 218 12902400 1000
65421336 ss7890 A Nov. 20, 2019, 9:02 a.m. OK PyPy 3 TESTS 57 218 12902400 1000
65416291 RalorSell A Nov. 20, 2019, 7:01 a.m. OK PyPy 3 TESTS 57 218 12902400 1000
65268413 poojanpatel101 A Nov. 17, 2019, 6:20 p.m. OK PyPy 3 TESTS 57 218 12902400 1000
65261565 _Temeraire A Nov. 17, 2019, 3:13 p.m. OK PyPy 3 TESTS 57 218 12902400 1000
65222688 essi A Nov. 16, 2019, 10:09 p.m. OK PyPy 3 TESTS 57 218 12902400 1000
65220353 juandrengifo A Nov. 16, 2019, 8:30 p.m. OK PyPy 3 TESTS 57 218 12902400 1000
65218225 rizwan486 A Nov. 16, 2019, 7:29 p.m. OK PyPy 3 TESTS 57 218 12902400 1000
68482527 CryUnderRain A Jan. 10, 2020, 8:21 a.m. OK PyPy 3 TESTS 57 218 13004800 1000
65223982 aaa_bbb_ccc A Nov. 16, 2019, 11:37 p.m. OK Python 2 TESTS 57 280 6553600 1000
65292130 bromanz A Nov. 18, 2019, 10:11 a.m. OK Python 2 TESTS 57 296 11673600 1000
65228757 phoenix28 A Nov. 17, 2019, 3:35 a.m. OK Python 2 TESTS 57 311 7782400 1000
65467616 ffbskt A Nov. 21, 2019, 6:52 a.m. OK Python 3 TESTS 57 171 10649600 1000
65269220 galim665 A Nov. 17, 2019, 6:45 p.m. OK Python 3 TESTS 57 186 9011200 1000
65217393 MohamedSameh A Nov. 16, 2019, 7:08 p.m. OK Python 3 TESTS 57 186 9011200 1000
66477920 Jsxft A Dec. 7, 2019, 10:22 p.m. OK Python 3 TESTS 57 186 9216000 1000
65618122 user_0001 A Nov. 24, 2019, 5:01 a.m. OK Python 3 TESTS 57 186 9216000 1000
65331984 orailly A Nov. 19, 2019, 6:47 a.m. OK Python 3 TESTS 57 186 10854400 1000
65532415 denis.nasyrov A Nov. 22, 2019, 12:57 p.m. OK Python 3 TESTS 57 187 8499200 1000
69471228 blue_edge A Jan. 24, 2020, 2:36 p.m. OK Python 3 TESTS 57 187 8601600 1000
65680161 TeaSpill A Nov. 24, 2019, 7:36 p.m. OK Python 3 TESTS 57 187 9011200 1000
65269190 sdptomndl A Nov. 17, 2019, 6:44 p.m. OK Python 3 TESTS 57 187 9011200 1000
65225518 tbogus A Nov. 17, 2019, 1:23 a.m. OK Ruby TESTS 57 187 18432000 1000
67405949 gearjack A Dec. 22, 2019, 6:24 a.m. OK Rust TESTS 57 31 1843200 1000

remove filters

Back to search problems