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 |
---|---|---|---|---|---|---|
1365 | Codeforces Round 648 (Div. 2) | FINISHED | False | 8100 | 140282699 | June 7, 2020, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 4460 ) | F | Swaps Again | PROGRAMMING | constructive algorithms implementation sortings | 2100 |
B'Ayush, Ashish and Vivek are busy preparing a new problem for the next Codeforces round and need help checking if their test cases are valid. Each test case consists of an integer n and two arrays a and b , of size n . If after some (possibly zero) operations described below, array a can be transformed into array b , the input is said to be valid. Otherwise, it is invalid. An operation on array a is: For example, if array a initially is {1, 2, 3, 4, 5, 6 } , after performing an operation with k = 2 , it is transformed into {5, 6, 3, 4, 1, 2 } . Given the set of test cases, help them determine if each one is valid or invalid. The first line contains one integer t (1 <= t <= 500) -- the number of test cases. The description of each test case is as follows. The first line of each test case contains a single integer n (1 <= n <= 500) -- the size of the arrays. The second line of each test case contains n integers a_1 , a_2 , ..., a_n (1 <= a_i <= 10^9) -- elements of array a . The third line of each test case contains n integers b_1 , b_2 , ..., b_n (1 <= b_i <= 10^9) -- elements of array b . For each test case, print "Yes" if the given input is valid. Otherwise print "No". You may print the answer in any case. For the first test case, we can swap prefix a[1:1] with suffix a[2:2] to get a=[2, 1] . For the second test case, a is already equal to b . For the third test case, it is impossible since we cannot obtain 3 in a . For the fourth test case, we can first swap prefix a[1:1] with suffix a[4:4] to obtain a=[2, 2, 3, 1] . Now we can swap prefix a[1:2] with suffix a[3:4] to obtain a=[3, 1, 2, 2] . For the fifth test case, it is impossible to convert a to b . '... |
Editorial — Codeforces Round #648 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
82887056 | Gassa | F | June 7, 2020, 8:07 p.m. | OK | D | TESTS | 118 | 234 | 6144000 | 2100 | |
82887286 | Gassa | F | June 7, 2020, 8:11 p.m. | OK | D | TESTS | 118 | 249 | 6144000 | 2100 | |
82899398 | ruban | F | June 8, 2020, 2:29 a.m. | OK | FPC | TESTS | 118 | 202 | 176332800 | 2100 | |
83135413 | jiedai | F | June 8, 2020, 12:41 p.m. | OK | GNU C++11 | TESTS | 122 | 61 | 0 | 2100 | |
82897345 | jeffyang | F | June 8, 2020, 1:30 a.m. | OK | GNU C++11 | TESTS | 118 | 61 | 0 | 2100 | |
83152323 | lin_rany | F | June 8, 2020, 3:50 p.m. | OK | GNU C++11 | TESTS | 122 | 61 | 4812800 | 2100 | |
83136500 | Thomasguo666 | F | June 8, 2020, 12:53 p.m. | OK | GNU C++11 | TESTS | 122 | 62 | 0 | 2100 | |
82972628 | Ghost_Dragon | F | June 8, 2020, 5:24 a.m. | OK | GNU C++11 | TESTS | 121 | 62 | 0 | 2100 | |
82972462 | Ghost_Dragon | F | June 8, 2020, 5:21 a.m. | OK | GNU C++11 | TESTS | 121 | 62 | 0 | 2100 | |
82897593 | jeffyang | F | June 8, 2020, 1:39 a.m. | OK | GNU C++11 | TESTS | 118 | 62 | 0 | 2100 | |
82897260 | Echo6342 | F | June 8, 2020, 1:28 a.m. | OK | GNU C++11 | TESTS | 118 | 62 | 0 | 2100 | |
82895150 | AyoAyowei | F | June 8, 2020, 12:11 a.m. | OK | GNU C++11 | TESTS | 118 | 62 | 0 | 2100 | |
83124882 | AutumnKite | F | June 8, 2020, 10:33 a.m. | OK | GNU C++11 | TESTS | 122 | 62 | 16793600 | 2100 | |
83258052 | _zay | F | June 9, 2020, 11:33 p.m. | OK | GNU C++14 | TESTS | 123 | 77 | 2252800 | 2100 | |
82893053 | Linkus | F | June 7, 2020, 10:41 p.m. | OK | GNU C++14 | TESTS | 118 | 78 | 204800 | 2100 | |
83150839 | jairadheyshyam | F | June 8, 2020, 3:34 p.m. | OK | GNU C++14 | TESTS | 122 | 124 | 204800 | 2100 | |
83210106 | petrov_defence | F | June 9, 2020, 10:41 a.m. | OK | GNU C++14 | TESTS | 123 | 140 | 204800 | 2100 | |
83169872 | starboy_jb | F | June 8, 2020, 8:11 p.m. | OK | GNU C++14 | TESTS | 122 | 140 | 204800 | 2100 | |
83141716 | BUG-JR | F | June 8, 2020, 1:58 p.m. | OK | GNU C++14 | TESTS | 122 | 140 | 204800 | 2100 | |
83388835 | t.mazenamria | F | June 11, 2020, 2:25 p.m. | OK | GNU C++14 | TESTS | 123 | 140 | 307200 | 2100 | |
83272292 | ankto | F | June 10, 2020, 6:10 a.m. | OK | GNU C++14 | TESTS | 123 | 140 | 307200 | 2100 | |
83265993 | atom0410 | F | June 10, 2020, 4:06 a.m. | OK | GNU C++14 | TESTS | 123 | 140 | 307200 | 2100 | |
83187438 | lequockhanh8a7 | F | June 9, 2020, 5:29 a.m. | OK | GNU C++14 | TESTS | 122 | 140 | 307200 | 2100 | |
83259886 | _LT_zyc | F | June 10, 2020, 12:59 a.m. | OK | GNU C++17 | TESTS | 123 | 124 | 409600 | 2100 | |
83327313 | k_8 | F | June 10, 2020, 6:12 p.m. | OK | GNU C++17 | TESTS | 123 | 139 | 307200 | 2100 | |
83336727 | meet29 | F | June 10, 2020, 9:45 p.m. | OK | GNU C++17 | TESTS | 123 | 140 | 204800 | 2100 | |
83167810 | S_A.H_ | F | June 8, 2020, 7:26 p.m. | OK | GNU C++17 | TESTS | 122 | 140 | 204800 | 2100 | |
83165470 | err0r | F | June 8, 2020, 6:46 p.m. | OK | GNU C++17 | TESTS | 122 | 140 | 204800 | 2100 | |
83158027 | kurzgesagt | F | June 8, 2020, 5:02 p.m. | OK | GNU C++17 | TESTS | 122 | 140 | 204800 | 2100 | |
83142086 | d4rkn19ht | F | June 8, 2020, 2:02 p.m. | OK | GNU C++17 | TESTS | 122 | 140 | 204800 | 2100 | |
83119803 | HNO2 | F | June 8, 2020, 9:28 a.m. | OK | GNU C++17 | TESTS | 122 | 140 | 204800 | 2100 | |
83109495 | hitman623 | F | June 8, 2020, 7:20 a.m. | OK | GNU C++17 | TESTS | 122 | 140 | 204800 | 2100 | |
83087937 | Priyam2k | F | June 8, 2020, 6:12 a.m. | OK | GNU C++17 | TESTS | 121 | 140 | 204800 | 2100 | |
83175234 | Bediver | F | June 8, 2020, 11:19 p.m. | OK | GNU C++17 (64) | TESTS | 122 | 109 | 0 | 2100 | |
83162733 | snapes | F | June 8, 2020, 6:06 p.m. | OK | GNU C++17 (64) | TESTS | 122 | 109 | 0 | 2100 | |
82886703 | emorgan5289 | F | June 7, 2020, 8:02 p.m. | OK | GNU C++17 (64) | TESTS | 118 | 109 | 0 | 2100 | |
82883374 | Pred | F | June 7, 2020, 7:17 p.m. | OK | GNU C++17 (64) | TESTS | 118 | 109 | 0 | 2100 | |
82895874 | Pandemic | F | June 8, 2020, 12:38 a.m. | OK | GNU C++17 (64) | TESTS | 118 | 109 | 204800 | 2100 | |
82888796 | AryssonFigueiredo | F | June 7, 2020, 8:40 p.m. | OK | GNU C++17 (64) | TESTS | 118 | 109 | 204800 | 2100 | |
83116114 | Kotehok3 | F | June 8, 2020, 8:43 a.m. | OK | GNU C++17 (64) | TESTS | 122 | 109 | 307200 | 2100 | |
83386629 | soumya_27 | F | June 11, 2020, 1:57 p.m. | OK | GNU C++17 (64) | TESTS | 123 | 124 | 0 | 2100 | |
83373713 | alif_cse_ju | F | June 11, 2020, 11:01 a.m. | OK | GNU C++17 (64) | TESTS | 123 | 124 | 0 | 2100 | |
83253560 | guptapratham42 | F | June 9, 2020, 8:34 p.m. | OK | GNU C++17 (64) | TESTS | 123 | 124 | 0 | 2100 | |
83333589 | magnickolas | F | June 10, 2020, 8:16 p.m. | OK | Go | TESTS | 123 | 498 | 5324800 | 2100 | |
82893867 | atishay127 | F | June 7, 2020, 11:16 p.m. | OK | Java 11 | TESTS | 118 | 218 | 0 | 2100 | |
82893384 | atishay127 | F | June 7, 2020, 10:54 p.m. | OK | Java 11 | TESTS | 118 | 233 | 0 | 2100 | |
83299210 | 533.sandyhu | F | June 10, 2020, 12:29 p.m. | OK | Java 11 | TESTS | 123 | 264 | 0 | 2100 | |
83111167 | zhupeijun | F | June 8, 2020, 7:42 a.m. | OK | Java 11 | TESTS | 122 | 296 | 0 | 2100 | |
83178718 | anhtaihsgs | F | June 9, 2020, 1:45 a.m. | OK | Java 11 | TESTS | 122 | 327 | 0 | 2100 | |
82888282 | bobib | F | June 7, 2020, 8:30 p.m. | OK | Java 11 | TESTS | 118 | 342 | 0 | 2100 | |
82890997 | skittles1412 | F | June 7, 2020, 9:33 p.m. | OK | Java 11 | TESTS | 118 | 343 | 0 | 2100 | |
83225455 | hiromi_ayase | F | June 9, 2020, 2:01 p.m. | OK | Java 11 | TESTS | 123 | 358 | 0 | 2100 | |
83156242 | AshrafEzz | F | June 8, 2020, 4:35 p.m. | OK | Java 11 | TESTS | 122 | 358 | 0 | 2100 | |
83021175 | PizzaLovers007 | F | June 8, 2020, 5:36 a.m. | OK | Java 11 | TESTS | 121 | 358 | 0 | 2100 | |
83202974 | bluesky111 | F | June 9, 2020, 9:03 a.m. | OK | Java 8 | TESTS | 123 | 156 | 0 | 2100 | |
82890999 | priyesh001 | F | June 7, 2020, 9:33 p.m. | OK | Java 8 | TESTS | 118 | 202 | 0 | 2100 | |
83338501 | Sharon | F | June 10, 2020, 10:57 p.m. | OK | Java 8 | TESTS | 123 | 218 | 0 | 2100 | |
83341679 | yaoct | F | June 11, 2020, 1:28 a.m. | OK | Java 8 | TESTS | 123 | 233 | 0 | 2100 | |
83262986 | DanielW48 | F | June 10, 2020, 2:46 a.m. | OK | Java 8 | TESTS | 123 | 233 | 0 | 2100 | |
83212120 | tsumit023 | F | June 9, 2020, 11:07 a.m. | OK | Java 8 | TESTS | 123 | 233 | 0 | 2100 | |
83144163 | ydned | F | June 8, 2020, 2:26 p.m. | OK | Java 8 | TESTS | 122 | 233 | 0 | 2100 | |
82896240 | akram-adel | F | June 8, 2020, 12:52 a.m. | OK | Java 8 | TESTS | 118 | 233 | 0 | 2100 | |
83303085 | 4qqqqzzz | F | June 10, 2020, 1:22 p.m. | OK | Java 8 | TESTS | 123 | 249 | 0 | 2100 | |
82894567 | ShesMyNerd | F | June 7, 2020, 11:47 p.m. | OK | Java 8 | TESTS | 118 | 249 | 0 | 2100 | |
83149436 | Spheniscine | F | June 8, 2020, 3:20 p.m. | OK | Kotlin | TESTS | 122 | 248 | 1126400 | 2100 | |
83149867 | Spheniscine | F | June 8, 2020, 3:24 p.m. | OK | Kotlin | TESTS | 122 | 264 | 1024000 | 2100 | |
83149084 | Spheniscine | F | June 8, 2020, 3:16 p.m. | OK | Kotlin | TESTS | 122 | 264 | 1126400 | 2100 | |
83157605 | golions | F | June 8, 2020, 4:55 p.m. | OK | Kotlin | TESTS | 122 | 343 | 102400 | 2100 | |
82881893 | Hakiobo | F | June 7, 2020, 7:01 p.m. | OK | Kotlin | TESTS | 118 | 405 | 716800 | 2100 | |
83251554 | Mosyagin | F | June 9, 2020, 7:45 p.m. | OK | Mono C# | TESTS | 123 | 280 | 3379200 | 2100 | |
83106405 | avtoruxadze | F | June 8, 2020, 6:41 a.m. | OK | Mono C# | TESTS | 121 | 389 | 7168000 | 2100 | |
83233134 | olpetOdessaONU | F | June 9, 2020, 3:23 p.m. | OK | MS C++ | TESTS | 123 | 155 | 0 | 2100 | |
83322094 | JulesIMF | F | June 10, 2020, 4:57 p.m. | OK | MS C++ 2017 | TESTS | 123 | 483 | 307200 | 2100 | |
83148506 | ilya_totl | F | June 8, 2020, 3:10 p.m. | OK | MS C++ 2017 | TESTS | 122 | 499 | 204800 | 2100 | |
82888725 | reikiriyama | F | June 7, 2020, 8:39 p.m. | OK | MS C++ 2017 | TESTS | 118 | 514 | 102400 | 2100 | |
83123013 | leeyupeng | F | June 8, 2020, 10:09 a.m. | OK | MS C++ 2017 | TESTS | 122 | 529 | 102400 | 2100 | |
82890259 | jackcaptain | F | June 7, 2020, 9:13 p.m. | OK | MS C++ 2017 | TESTS | 118 | 530 | 102400 | 2100 | |
83257040 | Shify | F | June 9, 2020, 10:41 p.m. | OK | MS C++ 2017 | TESTS | 123 | 546 | 307200 | 2100 | |
82891071 | jackcaptain | F | June 7, 2020, 9:35 p.m. | OK | MS C++ 2017 | TESTS | 118 | 561 | 102400 | 2100 | |
83545708 | MrBear | F | June 12, 2020, 3:38 p.m. | OK | MS C++ 2017 | TESTS | 123 | 561 | 307200 | 2100 | |
83125989 | samarth9421 | F | June 8, 2020, 10:46 a.m. | OK | MS C++ 2017 | TESTS | 122 | 561 | 4300800 | 2100 | |
82890897 | realnimish | F | June 7, 2020, 9:30 p.m. | OK | PyPy 2 | TESTS | 118 | 311 | 18534400 | 2100 | |
82890628 | realnimish | F | June 7, 2020, 9:22 p.m. | OK | PyPy 2 | TESTS | 118 | 311 | 18841600 | 2100 | |
83138733 | raj1307 | F | June 8, 2020, 1:22 p.m. | OK | PyPy 2 | TESTS | 122 | 483 | 22835200 | 2100 | |
83196267 | snape_here | F | June 9, 2020, 7:35 a.m. | OK | PyPy 2 | TESTS | 122 | 561 | 24473600 | 2100 | |
82878682 | your_Daddy___ | F | June 7, 2020, 6:34 p.m. | OK | PyPy 2 | TESTS | 118 | 592 | 8294400 | 2100 | |
83117200 | pratikjain226 | F | June 8, 2020, 8:57 a.m. | OK | PyPy 2 | TESTS | 122 | 592 | 23654400 | 2100 | |
82877989 | chayapatlbs | F | June 7, 2020, 6:29 p.m. | OK | PyPy 3 | TESTS | 118 | 311 | 7987200 | 2100 | |
83528478 | aberent | F | June 12, 2020, 12:08 p.m. | OK | PyPy 3 | TESTS | 123 | 312 | 10137600 | 2100 | |
82878289 | chayapatlbs | F | June 7, 2020, 6:31 p.m. | OK | PyPy 3 | TESTS | 118 | 343 | 7987200 | 2100 | |
82879139 | chayapatlbs | F | June 7, 2020, 6:37 p.m. | OK | PyPy 3 | TESTS | 118 | 358 | 7782400 | 2100 | |
83108495 | __eRRor__ | F | June 8, 2020, 7:07 a.m. | OK | PyPy 3 | TESTS | 121 | 421 | 7475200 | 2100 | |
83203983 | UTMoonlight | F | June 9, 2020, 9:17 a.m. | OK | PyPy 3 | TESTS | 123 | 498 | 7884800 | 2100 | |
82890660 | FireBird23 | F | June 7, 2020, 9:24 p.m. | OK | PyPy 3 | TESTS | 118 | 561 | 18124800 | 2100 | |
83275278 | tycyd | F | June 10, 2020, 6:52 a.m. | OK | PyPy 3 | TESTS | 123 | 639 | 10342400 | 2100 | |
83279420 | siyy | F | June 10, 2020, 7:52 a.m. | OK | PyPy 3 | TESTS | 123 | 654 | 26931200 | 2100 | |
82883517 | zii.hrs | F | June 7, 2020, 7:19 p.m. | OK | PyPy 3 | TESTS | 118 | 685 | 10240000 | 2100 | |
83107008 | ComptineDunAutreEte | F | June 8, 2020, 6:48 a.m. | OK | Python 2 | TESTS | 121 | 577 | 1024000 | 2100 | |
83203679 | weichee.yew | F | June 9, 2020, 9:13 a.m. | OK | Python 3 | TESTS | 123 | 421 | 1024000 | 2100 | |
83268671 | tinker_1337 | F | June 10, 2020, 5:07 a.m. | OK | Python 3 | TESTS | 123 | 421 | 1126400 | 2100 | |
83295322 | reddyjaideep17 | F | June 10, 2020, 11:37 a.m. | OK | Python 3 | TESTS | 123 | 436 | 1024000 | 2100 | |
83555465 | paimon | F | June 12, 2020, 6:34 p.m. | OK | Python 3 | TESTS | 123 | 436 | 1433600 | 2100 | |
83297317 | nebocco | F | June 10, 2020, 12:04 p.m. | OK | Python 3 | TESTS | 123 | 483 | 1331200 | 2100 | |
83322271 | amurto | F | June 10, 2020, 5 p.m. | OK | Python 3 | TESTS | 123 | 530 | 1126400 | 2100 | |
83250688 | chgliu | F | June 9, 2020, 7:28 p.m. | OK | Python 3 | TESTS | 123 | 530 | 1228800 | 2100 | |
83116355 | Pozhiloy_Vityok | F | June 8, 2020, 8:46 a.m. | OK | Python 3 | TESTS | 122 | 561 | 1228800 | 2100 | |
83110685 | Sunlight_sp | F | June 8, 2020, 7:36 a.m. | OK | Python 3 | TESTS | 122 | 561 | 1228800 | 2100 | |
83152487 | D_Jahnvai | F | June 8, 2020, 3:52 p.m. | OK | Python 3 | TESTS | 122 | 577 | 1228800 | 2100 | |
83380963 | cotton100pc | F | June 11, 2020, 12:39 p.m. | OK | Rust | TESTS | 123 | 78 | 409600 | 2100 | |
83501021 | t-uchida | F | June 12, 2020, 5:47 a.m. | OK | Rust | TESTS | 123 | 93 | 1024000 | 2100 | |
83175792 | kobae964 | F | June 8, 2020, 11:48 p.m. | OK | Rust | TESTS | 122 | 171 | 512000 | 2100 |
Back to search problems