Codeforces Round 632 (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
1333 Codeforces Round 632 (Div. 2) FINISHED False 7200 150996311 April 8, 2020, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 21720 ) B Kind Anton PROGRAMMING greedy implementation

B'Once again, Boris needs the help of Anton in creating a task. This time Anton needs to solve the following problem: There are two arrays of integers a and b of length n . It turned out that array a contains only elements from the set {-1, 0, 1 } . Anton can perform the following sequence of operations any number of times: For example, if you are given array [1, -1, 0] , you can transform it only to [1, -1, -1] , [1, 0, 0] and [1, -1, 1] by one operation. Anton wants to predict if it is possible to apply some number (zero or more) of these operations to the array a so that it becomes equal to array b . Can you help him? Each test contains multiple test cases. The first line contains the number of test cases t ( 1 <= t <= 10000 ). The description of the test cases follows. The first line of each test case contains a single integer n ( 1 <= n <= 10^5 ) -- the length of arrays. The second line of each test case contains n integers a_1, a_2, ... , a_n ( -1 <= a_i <= 1 ) -- elements of array a . There can be duplicates among elements. The third line of each test case contains n integers b_1, b_2, ... , b_n ( -10^9 <= b_i <= 10^9 ) -- elements of array b . There can be duplicates among elements. 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 the described operations, or "NO" if it 's impossible. You can print each letter in any case (upper or lower). In the first test-case we can choose (i, j)=(2, 3) twice and after that choose (i, j)=(1, 2) twice too. These operations will transform [1, -1, 0] to [1, -1, -2] to [1, 1, -2] In the second test case we can 't make equal numbers on the second position. In the third test case we can choose (i,'...

Tutorials

Codeforces Round #632 (Div. 2) editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
76297545 vjudge1 B April 12, 2020, 7:08 a.m. OK Clang++17 Diagnostics TESTS 35 108 0
76243094 vjudge1 B April 11, 2020, 7:34 a.m. OK Clang++17 Diagnostics TESTS 35 607 2764800
76242869 vjudge3 B April 11, 2020, 7:31 a.m. OK Clang++17 Diagnostics TESTS 35 888 921600
75941835 fpc_coder B April 9, 2020, 1:40 a.m. OK FPC TESTS 35 140 1024000
76293829 lifers B April 12, 2020, 6:30 a.m. OK GNU C11 TESTS 35 46 409600
75969702 maer19980918 B April 9, 2020, 8:42 a.m. OK GNU C11 TESTS 35 62 409600
75921818 Stranger321 B April 8, 2020, 6:55 p.m. OK GNU C11 TESTS 30 62 819200
75944305 Tung_Chintao B April 9, 2020, 2:40 a.m. OK GNU C11 TESTS 35 78 409600
76284003 Anil888 B April 12, 2020, 4:17 a.m. OK GNU C11 TESTS 35 78 819200
75909642 Zhoujie1999 B April 8, 2020, 4:31 p.m. OK GNU C11 TESTS 30 78 819200
75977796 Zahid1734 B April 9, 2020, 10:16 a.m. OK GNU C11 TESTS 35 78 819200
75980439 khasrulShihab B April 9, 2020, 10:47 a.m. OK GNU C11 TESTS 35 78 819200
76004152 pucuk16 B April 9, 2020, 2:55 p.m. OK GNU C11 TESTS 35 78 819200
76056905 Mahmud_Mostafa_Al_Maruf B April 10, 2020, 5:23 a.m. OK GNU C11 TESTS 35 78 819200
75978413 Enderturtle B April 9, 2020, 10:24 a.m. OK GNU C++11 TESTS 35 31 409600
75992901 vjudge1 B April 9, 2020, 1:05 p.m. OK GNU C++11 TESTS 35 31 614400
75992893 Tom66 B April 9, 2020, 1:05 p.m. OK GNU C++11 TESTS 35 31 614400
76007399 luogu_bot2 B April 9, 2020, 3:25 p.m. OK GNU C++11 TESTS 35 31 819200
76043912 ACMonster B April 9, 2020, 11:04 p.m. OK GNU C++11 TESTS 35 31 819200
76099750 WYXkk B April 10, 2020, 2:25 p.m. OK GNU C++11 TESTS 35 31 819200
76167183 LMB B April 10, 2020, 3:57 p.m. OK GNU C++11 TESTS 35 31 819200
76229842 wqst B April 11, 2020, 4:06 a.m. OK GNU C++11 TESTS 35 31 819200
75952336 gyh20 B April 9, 2020, 5:17 a.m. OK GNU C++11 TESTS 35 31 819200
75971884 jzp B April 9, 2020, 9:07 a.m. OK GNU C++11 TESTS 35 31 819200
76280427 MackereI_Pike B April 12, 2020, 3:03 a.m. OK GNU C++14 TESTS 35 31 921600
75905104 QAQAutoMaton B April 8, 2020, 4:22 p.m. OK GNU C++14 TESTS 30 31 6246400
76220249 springbottom B April 10, 2020, 11:27 p.m. OK GNU C++14 TESTS 35 61 409600
75964076 WLZ B April 9, 2020, 7:39 a.m. OK GNU C++14 TESTS 35 61 819200
75920610 OTTFF B April 8, 2020, 6:43 p.m. OK GNU C++14 TESTS 30 61 819200
76048393 carmen__ B April 10, 2020, 1:48 a.m. OK GNU C++14 TESTS 35 61 1536000
76047197 silxi B April 10, 2020, 1:03 a.m. OK GNU C++14 TESTS 35 61 4198400
75902022 kartikey.gupta24 B April 8, 2020, 4:15 p.m. OK GNU C++14 TESTS 30 62 409600
76208999 TheMaverick B April 10, 2020, 7:36 p.m. OK GNU C++14 TESTS 35 62 409600
76071142 Mr_Frodo B April 10, 2020, 8:49 a.m. OK GNU C++14 TESTS 35 62 614400
75955964 _andyli B April 9, 2020, 6:07 a.m. OK GNU C++17 TESTS 35 31 5836800
75947225 vjudge4 B April 9, 2020, 3:41 a.m. OK GNU C++17 TESTS 35 46 921600
75941751 alanchann B April 9, 2020, 1:38 a.m. OK GNU C++17 TESTS 35 61 819200
75951618 M...... B April 9, 2020, 5:06 a.m. OK GNU C++17 TESTS 35 62 409600
76022250 Mitta-Maria B April 9, 2020, 5:37 p.m. OK GNU C++17 TESTS 35 62 409600
76065942 theONEPIECE B April 10, 2020, 7:36 a.m. OK GNU C++17 TESTS 35 62 409600
76326097 pieruk B April 12, 2020, 12:47 p.m. OK GNU C++17 TESTS 35 62 819200
76423786 RafaelPanisset B April 12, 2020, 7:28 p.m. OK GNU C++17 TESTS 35 62 819200
76418753 mello B April 12, 2020, 6:31 p.m. OK GNU C++17 TESTS 35 62 819200
76320494 vjudge4 B April 12, 2020, 11:34 a.m. OK GNU C++17 TESTS 35 62 819200
75929266 LiSA B April 8, 2020, 8:30 p.m. OK GNU C++17 (64) TESTS 33 46 819200
75932792 moraprex B April 8, 2020, 9:32 p.m. OK GNU C++17 (64) TESTS 35 46 819200
75942770 iefnah06 B April 9, 2020, 2:05 a.m. OK GNU C++17 (64) TESTS 35 46 819200
75972174 ivan100sic B April 9, 2020, 9:11 a.m. OK GNU C++17 (64) TESTS 35 46 819200
75975417 aeiou1 B April 9, 2020, 9:49 a.m. OK GNU C++17 (64) TESTS 35 46 819200
75991254 Phortox B April 9, 2020, 12:47 p.m. OK GNU C++17 (64) TESTS 35 46 819200
76035760 ANAMiya.wanted B April 9, 2020, 8:15 p.m. OK GNU C++17 (64) TESTS 35 46 819200
76041591 neal B April 9, 2020, 9:59 p.m. OK GNU C++17 (64) TESTS 35 46 819200
76073837 i_o__o_i B April 10, 2020, 9:26 a.m. OK GNU C++17 (64) TESTS 35 46 819200
76328762 devillove084 B April 12, 2020, 1:15 p.m. OK GNU C++17 (64) TESTS 35 46 819200
76030667 Perman B April 9, 2020, 7:06 p.m. OK Go TESTS 35 62 512000
75957755 girkarkshitij B April 9, 2020, 6:29 a.m. OK Java 11 TESTS 35 187 0
76034604 bhautik_77 B April 9, 2020, 7:57 p.m. OK Java 11 TESTS 35 202 0
75988364 DreamInfinite B April 9, 2020, 12:15 p.m. OK Java 11 TESTS 35 202 0
75969486 jenish9599 B April 9, 2020, 8:40 a.m. OK Java 11 TESTS 35 202 0
75963991 Musin B April 9, 2020, 7:37 a.m. OK Java 11 TESTS 35 202 0
76260054 Baroudy B April 11, 2020, 7:25 p.m. OK Java 11 TESTS 35 218 0
76033192 Clowyy B April 9, 2020, 7:38 p.m. OK Java 11 TESTS 35 218 0
75946298 happy15 B April 9, 2020, 3:23 a.m. OK Java 11 TESTS 35 218 614400
76240805 nickleoden299 B April 11, 2020, 7:04 a.m. OK Java 11 TESTS 35 233 12083200
75917178 Leewings B April 8, 2020, 6:15 p.m. OK Java 11 TESTS 30 249 0
76217883 sahiltakkar B April 10, 2020, 10:20 p.m. OK Java 8 TESTS 35 124 0
76043802 bluesky111 B April 9, 2020, 11 p.m. OK Java 8 TESTS 35 124 0
76027061 In_The_Name_Of_Love B April 9, 2020, 6:24 p.m. OK Java 8 TESTS 35 124 0
75977834 Pranay2516 B April 9, 2020, 10:16 a.m. OK Java 8 TESTS 35 124 0
75974532 conquerorArpit B April 9, 2020, 9:38 a.m. OK Java 8 TESTS 35 124 0
75919051 parthivm20 B April 8, 2020, 6:30 p.m. OK Java 8 TESTS 30 124 0
75902822 rr459595 B April 8, 2020, 4:17 p.m. OK Java 8 TESTS 30 124 0
76188487 dhruvi897 B April 10, 2020, 4:40 p.m. OK Java 8 TESTS 35 139 0
75922488 buzaubakov.raman B April 8, 2020, 7:01 p.m. OK Java 8 TESTS 30 139 0
76272659 Youss B April 11, 2020, 11:20 p.m. OK Java 8 TESTS 35 140 0
75921780 EdoByte B April 8, 2020, 6:54 p.m. OK JavaScript TESTS 30 77 14848000
76269753 GTrigger B April 11, 2020, 10:04 p.m. OK JavaScript TESTS 35 140 17408000
75955453 Spheniscine B April 9, 2020, 6:01 a.m. OK Kotlin TESTS 35 171 3379200
75937537 TadijaSebez B April 8, 2020, 11:37 p.m. OK Kotlin TESTS 35 342 7577600
75903447 riantkb B April 8, 2020, 4:18 p.m. OK Mono C# TESTS 30 108 21401600
76083364 TRR B April 10, 2020, 11:26 a.m. OK Mono C# TESTS 35 124 15462400
75953069 shy3205 B April 9, 2020, 5:28 a.m. OK Mono C# TESTS 35 124 22425600
75927667 ansergeyg B April 8, 2020, 8:07 p.m. OK Mono C# TESTS 31 140 18022400
75944408 szzz- B April 9, 2020, 2:42 a.m. OK Mono C# TESTS 35 155 18124800
75937061 jainchethan87 B April 8, 2020, 11:22 p.m. OK Mono C# TESTS 35 155 21606400
76244452 vjudge1 B April 11, 2020, 7:51 a.m. OK MS C++ TESTS 35 78 819200
76324155 ldcdm B April 12, 2020, 12:26 p.m. OK MS C++ TESTS 35 170 1638400
75923025 tranthanhtra B April 8, 2020, 7:07 p.m. OK MS C++ TESTS 30 171 819200
75959157 satish0701 B April 9, 2020, 6:45 a.m. OK MS C++ TESTS 35 171 1228800
76314097 vjudge4 B April 12, 2020, 10:03 a.m. OK MS C++ TESTS 35 186 1638400
75910679 YTICpoch B April 8, 2020, 4:32 p.m. OK MS C++ TESTS 30 202 819200
76080593 vjudge3 B April 10, 2020, 10:53 a.m. OK MS C++ TESTS 35 264 1126400
76306546 vjudge2 B April 12, 2020, 8:44 a.m. OK MS C++ TESTS 35 748 819200
75906902 bumiejiang B April 8, 2020, 4:26 p.m. OK MS C++ 2017 TESTS 30 77 409600
76292773 vjudge1 B April 12, 2020, 6:19 a.m. OK MS C++ 2017 TESTS 35 77 819200
76243510 vjudge2 B April 11, 2020, 7:39 a.m. OK MS C++ 2017 TESTS 35 77 819200
76023462 leventa B April 9, 2020, 5:48 p.m. OK MS C++ 2017 TESTS 35 77 819200
76326418 vjudge2 B April 12, 2020, 12:50 p.m. OK MS C++ 2017 TESTS 35 78 819200
76245256 vjudge4 B April 11, 2020, 8:02 a.m. OK MS C++ 2017 TESTS 35 78 1638400
75969999 Bigface B April 9, 2020, 8:46 a.m. OK MS C++ 2017 TESTS 35 78 12083200
76003967 yeguzi B April 9, 2020, 2:53 p.m. OK MS C++ 2017 TESTS 35 93 1228800
76274560 Thinklark B April 12, 2020, 12:21 a.m. OK MS C++ 2017 TESTS 35 108 1228800
75948984 skymin B April 9, 2020, 4:19 a.m. OK MS C++ 2017 TESTS 35 156 1740800
75999257 lethehaiau B April 9, 2020, 2:09 p.m. OK Node.js TESTS 35 358 12390400
76014335 11fingers B April 9, 2020, 4:29 p.m. OK PyPy 2 TESTS 35 404 10342400
76278177 peijinz B April 12, 2020, 2:09 a.m. OK PyPy 2 TESTS 35 514 10649600
76226357 sanjeevkumar113f B April 11, 2020, 2:40 a.m. OK PyPy 3 TESTS 35 233 12697600
75941912 liupo B April 9, 2020, 1:42 a.m. OK PyPy 3 TESTS 35 249 12185600
76226493 sanjeevkumar113f B April 11, 2020, 2:44 a.m. OK PyPy 3 TESTS 35 249 12800000
75953975 roaris B April 9, 2020, 5:41 a.m. OK PyPy 3 TESTS 35 311 11878400
76056216 anagohirame B April 10, 2020, 5:10 a.m. OK PyPy 3 TESTS 35 327 11878400
75987212 CKP_ B April 9, 2020, 12:03 p.m. OK PyPy 3 TESTS 35 327 11878400
76012216 Anuranjan_Pandey B April 9, 2020, 4:10 p.m. OK PyPy 3 TESTS 35 327 11980800
75949926 diffeo B April 9, 2020, 4:38 a.m. OK PyPy 3 TESTS 35 327 11980800
75923261 TimurABS B April 8, 2020, 7:10 p.m. OK PyPy 3 TESTS 30 327 11980800
76036676 5AF1 B April 9, 2020, 8:31 p.m. OK PyPy 3 TESTS 35 342 15155200
76034765 elistark B April 9, 2020, 8 p.m. OK Python 2 TESTS 35 327 6246400
76034447 elistark B April 9, 2020, 7:55 p.m. OK Python 2 TESTS 35 685 6246400
75902043 convnathan B April 8, 2020, 4:15 p.m. OK Python 3 TESTS 30 202 9830400
76074532 subhajitdas B April 10, 2020, 9:35 a.m. OK Python 3 TESTS 35 202 9932800
75901679 rav317 B April 8, 2020, 4:14 p.m. OK Python 3 TESTS 30 233 9523200
75952766 Black_Fregat B April 9, 2020, 5:24 a.m. OK Python 3 TESTS 35 233 10752000
75909138 AbhijithG B April 8, 2020, 4:30 p.m. OK Python 3 TESTS 30 234 9523200
75949919 jha_saurav B April 9, 2020, 4:37 a.m. OK Python 3 TESTS 35 249 8806400
75982622 0110A B April 9, 2020, 11:12 a.m. OK Python 3 TESTS 35 249 9625600
76060235 m_f_h B April 10, 2020, 6:15 a.m. OK Python 3 TESTS 35 249 10547200
75969040 Tarang75490 B April 9, 2020, 8:35 a.m. OK Python 3 TESTS 35 264 9523200
76226790 alfietaylor10 B April 11, 2020, 2:52 a.m. OK Python 3 TESTS 35 265 9523200
76101724 tbogus B April 10, 2020, 2:39 p.m. OK Ruby TESTS 35 264 18944000
76052249 xyqkoala B April 10, 2020, 3:36 a.m. OK Rust TESTS 35 139 3686400

remove filters

Back to search problems