Codeforces Round 648 (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
1365 Codeforces Round 648 (Div. 2) FINISHED False 8100 145812311 June 7, 2020, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 27261 ) B Trouble Sort PROGRAMMING constructive algorithms implementation 1300

B'Ashish has n elements arranged in a line. These elements are represented by two integers a_i -- the value of the element and b_i -- the type of the element (there are only two possible types: 0 and 1 ). He wants to sort the elements in non-decreasing values of a_i . He can perform the following operation any number of times: Tell him if he can sort the elements in non-decreasing values of a_i after performing any number of operations. The first line contains one integer t (1 <= t <= 100) -- the number of test cases. The description of the test cases follows. The first line of each test case contains one integer n (1 <= n <= 500) -- the size of the arrays. The second line contains n integers a_i (1 <= a_i <= 10^5) -- the value of the i -th element. The third line containts n integers b_i (b_i in {0, 1 }) -- the type of the i -th element. For each test case, print "Yes" or "No" (without quotes) depending on whether it is possible to sort elements in non-decreasing order of their value. You may print each letter in any case (upper or lower). For the first case: The elements are already in sorted order. For the second case: Ashish may first swap elements at positions 1 and 2 , then swap elements at positions 2 and 3 . For the third case: The elements are already in sorted order. For the fourth case: No swap operations may be performed as there is no pair of elements i and j such that b_i ne b_j . The elements cannot be sorted. For the fifth case: Ashish may swap elements at positions 3 and 4 , then elements at positions 1 and 2 . '...

Tutorials

Editorial — Codeforces Round #648

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
83183409 ijk13 B June 9, 2020, 4:02 a.m. OK Clang++17 Diagnostics TESTS 26 358 307200 1300
83384963 quan.v0008212 B June 11, 2020, 1:35 p.m. OK FPC TESTS 26 46 307200 1300
83116824 Aftery142 B June 8, 2020, 8:52 a.m. OK FPC TESTS 26 46 409600 1300
83154021 chowdhuryshashwoto B June 8, 2020, 4:10 p.m. OK GNU C11 TESTS 26 31 0 1300
83169662 Deb_Neek B June 8, 2020, 8:06 p.m. OK GNU C11 TESTS 26 31 0 1300
83536192 zeus_mmmut B June 12, 2020, 1:48 p.m. OK GNU C11 TESTS 26 31 0 1300
83143482 mrashid_5919 B June 8, 2020, 2:18 p.m. OK GNU C11 TESTS 26 31 0 1300
83142617 pratyushranjan B June 8, 2020, 2:08 p.m. OK GNU C11 TESTS 26 31 0 1300
83383189 rackeh B June 11, 2020, 1:11 p.m. OK GNU C11 TESTS 26 46 0 1300
83179469 luvcoding99 B June 9, 2020, 2:13 a.m. OK GNU C11 TESTS 26 46 0 1300
83357954 parthdhorajiya365 B June 11, 2020, 7:23 a.m. OK GNU C11 TESTS 26 46 0 1300
83363385 _Ayush B June 11, 2020, 8:37 a.m. OK GNU C11 TESTS 26 46 0 1300
83382923 rackeh B June 11, 2020, 1:07 p.m. OK GNU C11 TESTS 26 46 0 1300
82894575 AyoAyowei B June 7, 2020, 11:47 p.m. OK GNU C++11 TESTS 26 15 0 1300
83125145 Quuns B June 8, 2020, 10:36 a.m. OK GNU C++11 TESTS 26 15 3993600 1300
83105981 froggyzhang B June 8, 2020, 6:36 a.m. OK GNU C++11 TESTS 26 30 0 1300
83124710 froggyzhang B June 8, 2020, 10:31 a.m. OK GNU C++11 TESTS 26 30 0 1300
83223348 _zay B June 9, 2020, 1:35 p.m. OK GNU C++11 TESTS 26 30 1945600 1300
83535045 vjudge5 B June 12, 2020, 1:33 p.m. OK GNU C++11 TESTS 26 30 7987200 1300
83225812 luogu_bot1 B June 9, 2020, 2:05 p.m. OK GNU C++11 TESTS 26 31 0 1300
83383630 xukuan B June 11, 2020, 1:17 p.m. OK GNU C++11 TESTS 26 31 0 1300
83228038 luogu_bot4 B June 9, 2020, 2:30 p.m. OK GNU C++11 TESTS 26 31 0 1300
83226103 do_while_true B June 9, 2020, 2:08 p.m. OK GNU C++11 TESTS 26 31 0 1300
83119848 WICK_ED B June 8, 2020, 9:29 a.m. OK GNU C++14 TESTS 26 31 0 1300
82885769 f2016941 B June 7, 2020, 7:48 p.m. OK GNU C++14 TESTS 26 31 0 1300
82889584 rishujain B June 7, 2020, 8:57 p.m. OK GNU C++14 TESTS 26 31 0 1300
82900071 madmin2619 B June 8, 2020, 2:45 a.m. OK GNU C++14 TESTS 26 31 0 1300
83529458 ak56867 B June 12, 2020, 12:21 p.m. OK GNU C++14 TESTS 26 46 0 1300
83567124 otaliptus B June 12, 2020, 10:53 p.m. OK GNU C++14 TESTS 26 46 0 1300
83524634 GabrielCamargo B June 12, 2020, 11:18 a.m. OK GNU C++14 TESTS 26 46 0 1300
83569284 Nutella3000 B June 13, 2020, 12:39 a.m. OK GNU C++14 TESTS 26 46 0 1300
83573317 Austere7 B June 13, 2020, 3:13 a.m. OK GNU C++14 TESTS 26 46 0 1300
83544554 no_one1111 B June 12, 2020, 3:24 p.m. OK GNU C++14 TESTS 26 46 0 1300
82888319 Stale_Flippant B June 7, 2020, 8:31 p.m. OK GNU C++17 TESTS 26 31 0 1300
83388020 0Kushagra0 B June 11, 2020, 2:15 p.m. OK GNU C++17 TESTS 26 31 0 1300
83333280 aayush_bhat1999 B June 10, 2020, 8:09 p.m. OK GNU C++17 TESTS 26 31 0 1300
83174095 adman B June 8, 2020, 10:21 p.m. OK GNU C++17 TESTS 26 31 0 1300
83172103 ifrad.k B June 8, 2020, 9:07 p.m. OK GNU C++17 TESTS 26 31 0 1300
83108655 gihewapos B June 8, 2020, 7:09 a.m. OK GNU C++17 TESTS 26 31 0 1300
82891195 jorgeajl B June 7, 2020, 9:38 p.m. OK GNU C++17 TESTS 26 31 102400 1300
82893962 hosein_bidaki B June 7, 2020, 11:20 p.m. OK GNU C++17 TESTS 26 31 102400 1300
83173269 dimasclown B June 8, 2020, 9:48 p.m. OK GNU C++17 TESTS 26 31 102400 1300
83562911 Isabela_CR B June 12, 2020, 8:43 p.m. OK GNU C++17 TESTS 26 31 204800 1300
83242842 tuanio B June 9, 2020, 5:25 p.m. OK GNU C++17 (64) TESTS 26 31 0 1300
83254642 bmu B June 9, 2020, 9:06 p.m. OK GNU C++17 (64) TESTS 26 31 0 1300
83292252 Alexand_Romanenko B June 10, 2020, 10:55 a.m. OK GNU C++17 (64) TESTS 26 31 0 1300
83305904 DeadPillow B June 10, 2020, 1:59 p.m. OK GNU C++17 (64) TESTS 26 31 0 1300
83334609 Kaban-5 B June 10, 2020, 8:42 p.m. OK GNU C++17 (64) TESTS 26 31 0 1300
83387378 misra_17 B June 11, 2020, 2:07 p.m. OK GNU C++17 (64) TESTS 26 31 0 1300
83191310 john__wick B June 9, 2020, 6:28 a.m. OK GNU C++17 (64) TESTS 26 31 0 1300
83214379 Gashintare B June 9, 2020, 11:35 a.m. OK GNU C++17 (64) TESTS 26 31 0 1300
83181746 Ameliorate B June 9, 2020, 3:21 a.m. OK GNU C++17 (64) TESTS 26 31 0 1300
83176835 Bekh B June 9, 2020, 12:35 a.m. OK GNU C++17 (64) TESTS 26 31 0 1300
82882095 pohzipohzi B June 7, 2020, 7:03 p.m. OK Go TESTS 26 46 4505600 1300
83112285 glebsamsonov B June 8, 2020, 7:57 a.m. OK Go TESTS 26 62 4812800 1300
82884624 bartek19121995 B June 7, 2020, 7:33 p.m. OK Go TESTS 26 77 0 1300
83234526 NGUYEN_THANH_LOI B June 9, 2020, 3:38 p.m. OK Go TESTS 26 77 102400 1300
83235074 NGUYEN_THANH_LOI B June 9, 2020, 3:45 p.m. OK Go TESTS 26 77 102400 1300
83206330 BugLeave B June 9, 2020, 9:50 a.m. OK Go TESTS 26 77 102400 1300
82901472 synapse B June 8, 2020, 3:15 a.m. OK Go TESTS 26 77 307200 1300
82901319 synapse B June 8, 2020, 3:11 a.m. OK Go TESTS 26 77 307200 1300
82884640 bartek19121995 B June 7, 2020, 7:33 p.m. OK Go TESTS 26 78 0 1300
82884572 bartek19121995 B June 7, 2020, 7:32 p.m. OK Go TESTS 26 78 0 1300
83331672 odomontois B June 10, 2020, 7:31 p.m. OK Haskell TESTS 26 30 102400 1300
83107178 zenlyj B June 8, 2020, 6:50 a.m. OK Java 11 TESTS 26 171 0 1300
83362365 p_unit B June 11, 2020, 8:24 a.m. OK Java 11 TESTS 26 186 0 1300
82903812 yeshwant97 B June 8, 2020, 3:59 a.m. OK Java 11 TESTS 26 186 0 1300
83479792 bckslsh03 B June 11, 2020, 8:06 p.m. OK Java 11 TESTS 26 187 0 1300
83334141 amit_chas B June 10, 2020, 8:29 p.m. OK Java 11 TESTS 26 187 0 1300
83291505 rajparekh2024 B June 10, 2020, 10:44 a.m. OK Java 11 TESTS 26 187 0 1300
83173829 moksh19177 B June 8, 2020, 10:09 p.m. OK Java 11 TESTS 26 187 0 1300
83139895 Apfeloxid B June 8, 2020, 1:36 p.m. OK Java 11 TESTS 26 187 0 1300
83111605 Witless_Deer B June 8, 2020, 7:47 a.m. OK Java 11 TESTS 26 187 0 1300
83109628 yahoo1529 B June 8, 2020, 7:22 a.m. OK Java 11 TESTS 26 187 0 1300
83569472 lilsuddy B June 13, 2020, 12:50 a.m. OK Java 8 TESTS 26 108 0 1300
83239297 labdhi B June 9, 2020, 4:37 p.m. OK Java 8 TESTS 26 109 0 1300
83172403 Naman_123 B June 8, 2020, 9:16 p.m. OK Java 8 TESTS 26 109 0 1300
83169665 undisputedAshu B June 8, 2020, 8:06 p.m. OK Java 8 TESTS 26 109 0 1300
83158254 onefineday01 B June 8, 2020, 5:07 p.m. OK Java 8 TESTS 26 109 0 1300
83155529 dyhu083 B June 8, 2020, 4:27 p.m. OK Java 8 TESTS 26 109 0 1300
83115099 bluesky111 B June 8, 2020, 8:31 a.m. OK Java 8 TESTS 26 109 0 1300
83105314 aditya314 B June 8, 2020, 6:28 a.m. OK Java 8 TESTS 26 109 0 1300
82903262 kunalkatiyar9 B June 8, 2020, 3:49 a.m. OK Java 8 TESTS 26 109 0 1300
82891863 goldcode8 B June 7, 2020, 9:58 p.m. OK Java 8 TESTS 26 109 0 1300
82885335 Luay B June 7, 2020, 7:42 p.m. OK JavaScript TESTS 26 46 2560000 1300
82901633 Spheniscine B June 8, 2020, 3:18 a.m. OK Kotlin TESTS 26 124 0 1300
83166860 shivam1420 B June 8, 2020, 7:09 p.m. OK Kotlin TESTS 26 140 0 1300
83116422 aandrrei B June 8, 2020, 8:47 a.m. OK Kotlin TESTS 26 186 0 1300
82891005 xwood B June 7, 2020, 9:33 p.m. OK Kotlin TESTS 26 202 1228800 1300
82899112 wuchaojie925 B June 8, 2020, 2:21 a.m. OK Kotlin TESTS 26 202 2048000 1300
83328356 wbars B June 10, 2020, 6:28 p.m. OK Kotlin TESTS 26 249 0 1300
83113705 samir143009 B June 8, 2020, 8:14 a.m. OK Mono C# TESTS 26 77 3072000 1300
83485510 Mosyagin B June 11, 2020, 10:49 p.m. OK Mono C# TESTS 26 77 3072000 1300
83251729 zazak B June 9, 2020, 7:49 p.m. OK Mono C# TESTS 26 93 6860800 1300
83165804 TRR B June 8, 2020, 6:52 p.m. OK Mono C# TESTS 26 108 3174400 1300
83566618 ygtcnl B June 12, 2020, 10:33 p.m. OK Mono C# TESTS 26 108 6860800 1300
82988829 _Trung_Nguyen B June 8, 2020, 5:28 a.m. OK Mono C# TESTS 26 108 6860800 1300
83324705 treasuryonly B June 10, 2020, 5:33 p.m. OK Mono C# TESTS 26 108 6860800 1300
83107637 ravinem1 B June 8, 2020, 6:56 a.m. OK Mono C# TESTS 26 108 7065600 1300
83570259 eSeF_ B June 13, 2020, 1:30 a.m. OK Mono C# TESTS 26 124 6860800 1300
83224201 olpetOdessaONU B June 9, 2020, 1:46 p.m. OK MS C++ TESTS 26 46 0 1300
83356953 acrux B June 11, 2020, 7:09 a.m. OK MS C++ TESTS 26 46 0 1300
83257766 pratik_p B June 9, 2020, 11:18 p.m. OK MS C++ TESTS 26 124 0 1300
83242011 TMHazem B June 9, 2020, 5:14 p.m. OK MS C++ 2017 TESTS 26 46 819200 1300
83185034 Shify B June 9, 2020, 4:41 a.m. OK MS C++ 2017 TESTS 26 78 0 1300
83543260 Van9Lebed B June 12, 2020, 3:09 p.m. OK MS C++ 2017 TESTS 26 78 0 1300
83490655 Cuberates B June 12, 2020, 2:17 a.m. OK MS C++ 2017 TESTS 26 78 0 1300
83376698 registuv B June 11, 2020, 11:42 a.m. OK MS C++ 2017 TESTS 26 78 0 1300
83364300 getN1ght B June 11, 2020, 8:51 a.m. OK MS C++ 2017 TESTS 26 78 0 1300
83346829 skkuinkwan1205 B June 11, 2020, 3:59 a.m. OK MS C++ 2017 TESTS 26 78 0 1300
82886170 ilya_totl B June 7, 2020, 7:54 p.m. OK MS C++ 2017 TESTS 26 78 0 1300
82881268 poulaatef B June 7, 2020, 6:55 p.m. OK MS C++ 2017 TESTS 26 78 409600 1300
83536408 MrBear B June 12, 2020, 1:50 p.m. OK MS C++ 2017 TESTS 26 93 0 1300
83149038 arpit2438735 B June 8, 2020, 3:16 p.m. OK Node.js TESTS 26 93 4608000 1300
83204391 yinlei B June 9, 2020, 9:23 a.m. OK PHP TESTS 26 46 409600 1300
83329645 SK_EON B June 10, 2020, 6:51 p.m. OK PyPy 2 TESTS 26 155 1945600 1300
82893455 ycui11 B June 7, 2020, 10:57 p.m. OK PyPy 2 TESTS 26 170 2150400 1300
83165942 UTMoonlight B June 8, 2020, 6:54 p.m. OK PyPy 3 TESTS 26 155 1945600 1300
83330231 nickdiazarmy209 B June 10, 2020, 7:02 p.m. OK PyPy 3 TESTS 26 155 2252800 1300
83330089 nickdiazarmy209 B June 10, 2020, 7 p.m. OK PyPy 3 TESTS 26 156 2150400 1300
82885563 apoorvwatsky B June 7, 2020, 7:46 p.m. OK PyPy 3 TESTS 26 156 2150400 1300
82887302 aberent B June 7, 2020, 8:11 p.m. OK PyPy 3 TESTS 26 171 2150400 1300
83162509 Anuranjan_Pandey B June 8, 2020, 6:03 p.m. OK PyPy 3 TESTS 26 171 2969600 1300
83122609 beta_rr B June 8, 2020, 10:04 a.m. OK PyPy 3 TESTS 26 171 2969600 1300
82887985 Naman_Tyagi B June 7, 2020, 8:24 p.m. OK PyPy 3 TESTS 26 171 2969600 1300
82904268 Sameer-Mann B June 8, 2020, 4:07 a.m. OK PyPy 3 TESTS 26 171 3276800 1300
82894450 nickdiazarmy209 B June 7, 2020, 11:42 p.m. OK PyPy 3 TESTS 26 186 2867200 1300
82884039 crapplet B June 7, 2020, 7:25 p.m. OK Python 2 TESTS 26 202 614400 1300
83290399 ComptineDunAutreEte B June 10, 2020, 10:28 a.m. OK Python 2 TESTS 26 217 512000 1300
83328974 sirjan13 B June 10, 2020, 6:38 p.m. OK Python 2 TESTS 26 218 512000 1300
82882492 Hitikkumar B June 7, 2020, 7:07 p.m. OK Python 2 TESTS 26 218 614400 1300
83116415 hooded_sweater B June 8, 2020, 8:47 a.m. OK Python 2 TESTS 26 249 614400 1300
82881929 elistark B June 7, 2020, 7:01 p.m. OK Python 2 TESTS 26 249 614400 1300
83243419 love_bro B June 9, 2020, 5:34 p.m. OK Python 3 TESTS 26 109 716800 1300
82882149 lollihunter B June 7, 2020, 7:04 p.m. OK Python 3 TESTS 26 109 716800 1300
83359200 steph1 B June 11, 2020, 7:40 a.m. OK Python 3 TESTS 26 109 1024000 1300
83510483 SEGFAULTSEGFAULTSEGFAULT B June 12, 2020, 8:07 a.m. OK Python 3 TESTS 26 124 716800 1300
83389410 munna.mar11 B June 11, 2020, 2:32 p.m. OK Python 3 TESTS 26 124 716800 1300
83248746 subhajitdas B June 9, 2020, 6:55 p.m. OK Python 3 TESTS 26 124 716800 1300
83089004 c_handler B June 8, 2020, 6:24 a.m. OK Python 3 TESTS 26 124 716800 1300
83088852 sh1194 B June 8, 2020, 6:22 a.m. OK Python 3 TESTS 26 124 716800 1300
82922389 sad_hobbit B June 8, 2020, 4:46 a.m. OK Python 3 TESTS 26 124 716800 1300
82901301 KanhuKeNanu B June 8, 2020, 3:11 a.m. OK Python 3 TESTS 26 124 716800 1300
83494259 Rara. B June 12, 2020, 3:39 a.m. OK Ruby TESTS 26 109 819200 1300
83494201 TheStrange B June 12, 2020, 3:38 a.m. OK Ruby TESTS 26 140 819200 1300
83373711 cotton100pc B June 11, 2020, 11:01 a.m. OK Rust TESTS 26 31 307200 1300
83502915 t-uchida B June 12, 2020, 6:16 a.m. OK Rust TESTS 26 46 307200 1300
83174608 kobae964 B June 8, 2020, 10:47 p.m. OK Rust TESTS 26 46 307200 1300
83330312 Andrey_R B June 10, 2020, 7:04 p.m. OK Rust TESTS 26 46 409600 1300
83198259 shion_ B June 9, 2020, 8:03 a.m. OK Rust TESTS 26 46 614400 1300

remove filters

Back to search problems