Codeforces Round 860 (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
1798 Codeforces Round 860 (Div. 2) FINISHED False 7200 51981899 March 26, 2023, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 19938 ) A Showstopper PROGRAMMING greedy implementation sortings 800

B'You are given two arrays a_1, a_2, ldots, a_n and b_1, b_2, ldots, b_n . In one operation, you can choose any integer i from 1 to n and swap the numbers a_i and b_i . Determine whether, after using any (possibly zero) number of operations, the following two conditions can be satisfied simultaneously: Here max(c_1, c_2, ldots, c_k) denotes the maximum number among c_1, c_2, ldots, c_k . For example, max(3, 5, 4) = 5 , max(1, 7, 7) = 7 , max(6, 2) = 6 . Each test contains multiple test cases. The first line contains the number of test cases t ( 1 <= t <= 200 ). The description of the test cases follows. The first line of each test case contains a single integer n ( 1 <= n <= 100 ) -- the length of the arrays. The second line of each test case contains n integers a_1, a_2, ldots, a_n ( 1 <= a_i <= 100 ) -- elements of the first array. The third line of each test case contains n integers b_1, b_2, ldots, b_n ( 1 <= b_i <= 100 ) -- elements of the second array. For each test case, print "Yes" if after using any (possibly zero) number of operations the conditions described above are satisfied. Otherwise, print "No". You can output the answer in any case (upper or lower). For example, the strings "yEs", "yes", "Yes", and "YES" will be recognized as positive responses. In the first test case, you can swap the numbers a_3 and b_3 , after which the array a becomes equal to [7, 9, 9] , and the array b becomes equal to [7, 6, 7] , and both conditions are met. In the second test case, it can be proved that it is impossible to satisfy both conditions. In the third test case, you can swap the numbers a_1 and b_1 , after which the array a becomes equal to [99, 99] , and the array b becomes equal to [100, 100] , and both conditions are satisfied. In fifth test case, yo'...

Tutorials

Editorial of Codeforces Round 860 (Div. 2)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
199488342 jack_mercy A March 28, 2023, 4:30 a.m. OK C# 10 TESTS 4 46 2150400 800
199744248 koop A March 29, 2023, 6:35 p.m. OK C# 10 TESTS 4 46 2457600 800
199485232 jack_mercy A March 28, 2023, 3:39 a.m. OK C# 10 TESTS 4 140 2150400 800
199868190 bsherhj A March 30, 2023, 6:03 p.m. OK C# 8 TESTS 4 77 2355200 800
199489312 shivavalluri1122 A March 28, 2023, 4:46 a.m. OK Clang++17 Diagnostics TESTS 4 124 0 800
199725708 vishalbangaru4 A March 29, 2023, 3:39 p.m. OK Clang++17 Diagnostics TESTS 4 139 0 800
199448349 pintu2026sheera A March 27, 2023, 6:09 p.m. OK Clang++17 Diagnostics TESTS 4 155 0 800
199556266 tea_56 A March 28, 2023, 3:20 p.m. OK Clang++20 Diagnostics TESTS 4 109 0 800
199583948 Bigwave_ A March 28, 2023, 7:18 p.m. OK Clang++20 Diagnostics TESTS 4 124 0 800
199559762 ShikiFujin A March 28, 2023, 3:47 p.m. OK Clang++20 Diagnostics TESTS 4 124 5222400 800
199427677 visitor031 A March 27, 2023, 3:12 p.m. OK Clang++20 Diagnostics TESTS 4 124 5222400 800
199507838 Tomato_bandit A March 28, 2023, 8:33 a.m. OK Clang++20 Diagnostics TESTS 4 139 0 800
199462204 lazy_03 A March 27, 2023, 8:38 p.m. OK Clang++20 Diagnostics TESTS 4 139 0 800
199408558 AkashGaneriwal A March 27, 2023, 12:49 p.m. OK Clang++20 Diagnostics TESTS 4 140 0 800
199420023 Awesome3.14 A March 27, 2023, 2:13 p.m. OK D TESTS 4 31 102400 800
200025131 riteshsjb A March 31, 2023, 5:19 p.m. OK GNU C11 TESTS 4 15 0 800
199400137 Mr.Hacker. A March 27, 2023, 11:37 a.m. OK GNU C11 TESTS 4 15 0 800
199571754 bbb223 A March 28, 2023, 5:22 p.m. OK GNU C11 TESTS 4 15 0 800
199931510 sujoy_ruet_21 A March 31, 2023, 10:19 a.m. OK GNU C11 TESTS 4 15 0 800
199406044 zbhfy A March 27, 2023, 12:28 p.m. OK GNU C11 TESTS 4 15 102400 800
199405419 Troublesleeping A March 27, 2023, 12:23 p.m. OK GNU C11 TESTS 4 15 102400 800
199743867 _M7s3c7 A March 29, 2023, 6:30 p.m. OK GNU C11 TESTS 4 30 0 800
199571317 bbb223 A March 28, 2023, 5:19 p.m. OK GNU C11 TESTS 4 31 0 800
199470529 c0derro A March 27, 2023, 10:20 p.m. OK GNU C11 TESTS 4 296 0 800
199418351 DQYdqy The_KOG A March 27, 2023, 2:01 p.m. OK GNU C++14 TESTS 4 0 0 800
199400190 Xu_Hongxi A March 27, 2023, 11:37 a.m. OK GNU C++14 TESTS 4 0 0 800
199613486 DreamSpaceDream A March 29, 2023, 3:29 a.m. OK GNU C++14 TESTS 4 0 0 800
199440779 codefreak28 A March 27, 2023, 5:01 p.m. OK GNU C++14 TESTS 4 0 102400 800
200040722 Golu15 A March 31, 2023, 7:43 p.m. OK GNU C++14 TESTS 4 0 204800 800
199421073 ICEMAN4540 A March 27, 2023, 2:21 p.m. OK GNU C++14 TESTS 4 0 204800 800
199858261 Tanmay_790 A March 30, 2023, 4:40 p.m. OK GNU C++14 TESTS 4 0 204800 800
199953698 wrongname A March 31, 2023, 1:58 p.m. OK GNU C++14 TESTS 4 15 0 800
200066758 darkshadow2 A April 1, 2023, 3:09 a.m. OK GNU C++14 TESTS 4 15 0 800
199956480 Dog_E A March 31, 2023, 2:25 p.m. OK GNU C++14 TESTS 4 15 0 800
199912235 harsh_67 A March 31, 2023, 6:24 a.m. OK GNU C++17 TESTS 4 0 0 800
199938263 sartajislam21 A March 31, 2023, 11:29 a.m. OK GNU C++17 TESTS 4 0 0 800
199859817 denni_08 A March 30, 2023, 4:53 p.m. OK GNU C++17 TESTS 4 0 0 800
199781202 eman_shehta A March 30, 2023, 4:50 a.m. OK GNU C++17 TESTS 4 0 0 800
199729826 3396724494 A March 29, 2023, 4:16 p.m. OK GNU C++17 TESTS 4 0 0 800
199637851 kshitij11 A March 29, 2023, 8:54 a.m. OK GNU C++17 TESTS 4 0 0 800
199559577 gzzz A March 28, 2023, 3:46 p.m. OK GNU C++17 TESTS 4 0 0 800
199443930 Munna10219 A March 27, 2023, 5:27 p.m. OK GNU C++17 TESTS 4 0 0 800
199439477 NoxProgrammer A March 27, 2023, 4:50 p.m. OK GNU C++17 TESTS 4 0 0 800
199438881 tasin_001 A March 27, 2023, 4:45 p.m. OK GNU C++17 TESTS 4 0 0 800
199635676 deepanshusau A March 29, 2023, 8:31 a.m. OK GNU C++17 (64) TESTS 4 0 0 800
199651172 ganeshpr227 A March 29, 2023, 9:30 a.m. OK GNU C++17 (64) TESTS 4 0 0 800
199715716 muzizhou A March 29, 2023, 2:22 p.m. OK GNU C++17 (64) TESTS 4 0 0 800
199768055 mnndq A March 30, 2023, 12:08 a.m. OK GNU C++17 (64) TESTS 4 0 0 800
199794475 EotUL8d7 A March 30, 2023, 7:46 a.m. OK GNU C++17 (64) TESTS 4 0 0 800
199803582 lddc A March 30, 2023, 9:30 a.m. OK GNU C++17 (64) TESTS 4 0 0 800
199873430 RH_Shaudho A March 30, 2023, 7:01 p.m. OK GNU C++17 (64) TESTS 4 0 0 800
199915163 wygzgyw A March 31, 2023, 7:01 a.m. OK GNU C++17 (64) TESTS 4 0 0 800
199923344 IrisQAQ A March 31, 2023, 8:48 a.m. OK GNU C++17 (64) TESTS 4 0 0 800
199949777 _zzh A March 31, 2023, 1:18 p.m. OK GNU C++17 (64) TESTS 4 0 0 800
199935612 Joe_yue6 A March 31, 2023, 11:04 a.m. OK GNU C++20 (64) TESTS 4 0 0 800
200015134 Glydon A March 31, 2023, 4:26 p.m. OK GNU C++20 (64) TESTS 4 0 0 800
199957167 Shayan86 A March 31, 2023, 2:31 p.m. OK GNU C++20 (64) TESTS 4 0 0 800
199945764 Try_again A March 31, 2023, 12:41 p.m. OK GNU C++20 (64) TESTS 4 0 0 800
199943191 Dabhi_Dipak A March 31, 2023, 12:16 p.m. OK GNU C++20 (64) TESTS 4 0 0 800
199934117 baiwang A March 31, 2023, 10:47 a.m. OK GNU C++20 (64) TESTS 4 0 0 800
200045939 M.Abdelnasser A March 31, 2023, 8:39 p.m. OK GNU C++20 (64) TESTS 4 0 0 800
200041682 Snow_White_7 A March 31, 2023, 7:54 p.m. OK GNU C++20 (64) TESTS 4 0 0 800
200033506 Mainamanhoon_ A March 31, 2023, 6:26 p.m. OK GNU C++20 (64) TESTS 4 0 0 800
200031565 practicecode2place A March 31, 2023, 6:08 p.m. OK GNU C++20 (64) TESTS 4 0 0 800
199535651 amon_get A March 28, 2023, 12:49 p.m. OK Go TESTS 4 311 2355200 800
199440453 khhhhhhh A March 27, 2023, 4:58 p.m. OK Go TESTS 4 327 2355200 800
199429239 Yash9890 A March 27, 2023, 3:25 p.m. OK Java 11 TESTS 4 155 0 800
199852041 m0rka1 A March 30, 2023, 3:50 p.m. OK Java 11 TESTS 4 156 0 800
199744568 mishra316x A March 29, 2023, 6:38 p.m. OK Java 11 TESTS 4 156 0 800
199453714 jayan_pahuja A March 27, 2023, 7:02 p.m. OK Java 11 TESTS 4 171 0 800
199717360 NithinBharathi A March 29, 2023, 2:34 p.m. OK Java 11 TESTS 4 171 0 800
199567894 the_half_blood_prince A March 28, 2023, 4:53 p.m. OK Java 11 TESTS 4 171 0 800
199409862 madarin_utk A March 27, 2023, 12:59 p.m. OK Java 11 TESTS 4 171 0 800
199404410 Panther369 A March 27, 2023, 12:15 p.m. OK Java 11 TESTS 4 171 0 800
199408785 bleach__ A March 27, 2023, 12:50 p.m. OK Java 11 TESTS 4 186 4198400 800
199698724 Dream-On A March 29, 2023, 12:19 p.m. OK Java 11 TESTS 4 187 0 800
200026393 merlin_ A March 31, 2023, 5:27 p.m. OK Java 17 TESTS 4 139 102400 800
199637029 kaifkhan. A March 29, 2023, 8:46 a.m. OK Java 17 TESTS 4 170 102400 800
199399291 prathamtyagii A March 27, 2023, 11:29 a.m. OK Java 17 TESTS 4 171 0 800
199459246 rated21 A March 27, 2023, 8:07 p.m. OK Java 17 TESTS 4 171 512000 800
199627286 PizzaLovers007 A March 29, 2023, 6:49 a.m. OK Java 17 TESTS 4 186 102400 800
199985262 muppetlol A March 31, 2023, 3:14 p.m. OK Java 17 TESTS 4 186 512000 800
199458874 rated21 A March 27, 2023, 8:03 p.m. OK Java 17 TESTS 4 186 512000 800
199531522 ArunRo45 A March 28, 2023, 12:16 p.m. OK Java 17 TESTS 4 187 409600 800
200034273 lakshyamittal2201 A March 31, 2023, 6:33 p.m. OK Java 17 TESTS 4 187 614400 800
199483302 Harshit_3905 A March 28, 2023, 3:07 a.m. OK Java 17 TESTS 4 202 409600 800
199574981 Kenzhezhan A March 28, 2023, 5:47 p.m. OK Java 8 TESTS 4 78 0 800
200060160 Mohammad_Anwar A April 1, 2023, 12:57 a.m. OK Java 8 TESTS 4 92 0 800
199633799 oneafter A March 29, 2023, 8:10 a.m. OK Java 8 TESTS 4 92 0 800
200067639 KKKZOZ A April 1, 2023, 3:23 a.m. OK Java 8 TESTS 4 93 0 800
199900857 yvbf A March 31, 2023, 3:01 a.m. OK Java 8 TESTS 4 93 0 800
199545265 p_310598 A March 28, 2023, 1:59 p.m. OK Java 8 TESTS 4 93 0 800
199544910 _mad_lad A March 28, 2023, 1:57 p.m. OK Java 8 TESTS 4 93 0 800
199498144 iamdimonis A March 28, 2023, 6:44 a.m. OK Java 8 TESTS 4 93 0 800
199431979 ahmedTarek28 A March 27, 2023, 3:46 p.m. OK Java 8 TESTS 4 93 0 800
199398856 Parth_Pandey A March 27, 2023, 11:25 a.m. OK Java 8 TESTS 4 93 0 800
199401999 SlavaG A March 27, 2023, 11:54 a.m. OK Kotlin 1.7 TESTS 4 296 3276800 800
199548532 jingw A March 28, 2023, 2:22 p.m. OK MS C++ 2017 TESTS 4 15 0 800
199538034 PCY A March 28, 2023, 1:07 p.m. OK MS C++ 2017 TESTS 4 15 16076800 800
199541125 alex0511 A March 28, 2023, 1:29 p.m. OK MS C++ 2017 TESTS 4 30 0 800
199560462 captainHolt A March 28, 2023, 3:53 p.m. OK MS C++ 2017 TESTS 4 31 0 800
199532065 Aayush5sep A March 28, 2023, 12:20 p.m. OK MS C++ 2017 TESTS 4 31 0 800
199445235 sudhanshu9729 A March 27, 2023, 5:39 p.m. OK MS C++ 2017 TESTS 4 31 0 800
199417463 LinSept A March 27, 2023, 1:55 p.m. OK MS C++ 2017 TESTS 4 31 0 800
199409185 Marcus_Rashford A March 27, 2023, 12:53 p.m. OK MS C++ 2017 TESTS 4 31 0 800
199398610 Dathon_HCMUS A March 27, 2023, 11:23 a.m. OK MS C++ 2017 TESTS 4 31 0 800
199557189 helenmie A March 28, 2023, 3:27 p.m. OK MS C++ 2017 TESTS 4 31 1638400 800
199804907 s403o A March 30, 2023, 9:45 a.m. OK PyPy 2 TESTS 4 109 2048000 800
199778784 s403o A March 30, 2023, 4:07 a.m. OK PyPy 2 TESTS 4 109 2252800 800
199778865 s403o A March 30, 2023, 4:08 a.m. OK PyPy 2 TESTS 4 171 2150400 800
199552715 Plateau_prince A March 28, 2023, 2:53 p.m. OK PyPy 3 TESTS 4 93 2150400 800
199608181 NonprincipalUltrafilter A March 29, 2023, 1:44 a.m. OK PyPy 3 TESTS 4 93 2457600 800
199458322 prabhat_7167 A March 27, 2023, 7:57 p.m. OK PyPy 3 TESTS 4 108 1843200 800
199436087 JUBHAI A March 27, 2023, 4:21 p.m. OK PyPy 3 TESTS 4 108 1843200 800
199849589 trckster A March 30, 2023, 3:34 p.m. OK PyPy 3 TESTS 4 108 2252800 800
199420656 AhmadObaidat A March 27, 2023, 2:18 p.m. OK PyPy 3 TESTS 4 109 1843200 800
199925772 takshaheryar A March 31, 2023, 9:16 a.m. OK PyPy 3 TESTS 4 109 2048000 800
199872245 __Manticore__ A March 30, 2023, 6:46 p.m. OK PyPy 3 TESTS 4 109 2048000 800
199592460 elementary.god A March 28, 2023, 8:57 p.m. OK PyPy 3 TESTS 4 124 1843200 800
199465639 jinzew A March 27, 2023, 9:12 p.m. OK PyPy 3 TESTS 4 124 1843200 800
199538671 sami02jain A March 28, 2023, 1:12 p.m. OK PyPy 3-64 TESTS 4 46 1945600 800
199407941 kshitijmsp A March 27, 2023, 12:44 p.m. OK PyPy 3-64 TESTS 4 61 1945600 800
199436137 roheena2003 A March 27, 2023, 4:21 p.m. OK PyPy 3-64 TESTS 4 61 2048000 800
199714918 mani_sarthak A March 29, 2023, 2:16 p.m. OK PyPy 3-64 TESTS 4 61 2150400 800
199413675 DP_FORMULA A March 27, 2023, 1:28 p.m. OK PyPy 3-64 TESTS 4 62 2150400 800
199442524 Youarenotgood A March 27, 2023, 5:16 p.m. OK PyPy 3-64 TESTS 4 62 2252800 800
199398323 Mayank_Bad A March 27, 2023, 11:20 a.m. OK PyPy 3-64 TESTS 4 62 2355200 800
199783535 NABIEVMEHRUBON A March 30, 2023, 5:26 a.m. OK PyPy 3-64 TESTS 4 77 1843200 800
199575851 isekun A March 28, 2023, 5:55 p.m. OK PyPy 3-64 TESTS 4 77 1843200 800
199403528 VigneshReddyJulakanti A March 27, 2023, 12:07 p.m. OK PyPy 3-64 TESTS 4 77 1843200 800
200070613 pennymagic156 A April 1, 2023, 4:10 a.m. OK Python 3 TESTS 4 31 0 800
199608411 p0ff A March 29, 2023, 1:49 a.m. OK Python 3 TESTS 4 31 0 800
199554774 tazalapizza A March 28, 2023, 3:09 p.m. OK Python 3 TESTS 4 31 0 800
199487088 abhigeddam94 A March 28, 2023, 4:11 a.m. OK Python 3 TESTS 4 31 0 800
199957440 FireANMA A March 31, 2023, 2:34 p.m. OK Python 3 TESTS 4 46 0 800
199933403 mdshadesh A March 31, 2023, 10:39 a.m. OK Python 3 TESTS 4 46 0 800
199921972 UDIT_MITTAL A March 31, 2023, 8:32 a.m. OK Python 3 TESTS 4 46 0 800
199917337 makflaj A March 31, 2023, 7:31 a.m. OK Python 3 TESTS 4 46 0 800
199909235 Rohitraj60134 A March 31, 2023, 5:45 a.m. OK Python 3 TESTS 4 46 0 800
199901312 AbdoTolba A March 31, 2023, 3:11 a.m. OK Python 3 TESTS 4 46 0 800
199584607 Milrosen A March 28, 2023, 7:27 p.m. OK Rust 2021 TESTS 4 0 0 800
199473195 nairb A March 27, 2023, 11:10 p.m. OK Rust 2021 TESTS 4 15 102400 800

remove filters

Back to search problems