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
( 23471 ) C Rotation Matching PROGRAMMING constructive algorithms data structures greedy implementation 1400

B"After the mysterious disappearance of Ashish, his two favourite disciples Ishika and Hriday, were each left with one half of a secret message. These messages can each be represented by a permutation of size n . Let's call them a and b . Note that a permutation of n elements is a sequence of numbers a_1, a_2, ldots, a_n , in which every number from 1 to n appears exactly once. The message can be decoded by an arrangement of sequence a and b , such that the number of matching pairs of elements between them is maximum. A pair of elements a_i and b_j is said to match if: His two disciples are allowed to perform the following operation any number of times: A single cyclic shift to the left on any permutation c is an operation that sets c_1:=c_2, c_2:=c_3, ldots, c_n:=c_1 simultaneously. Likewise, a single cyclic shift to the right on any permutation c is an operation that sets c_1:=c_n, c_2:=c_1, ldots, c_n:=c_{n-1} simultaneously. Help Ishika and Hriday find the maximum number of pairs of elements that match after performing the operation any (possibly zero) number of times. The first line of the input contains a single integer n (1 <= n <= 2 cdot 10^5) -- the size of the arrays. The second line contains n integers a_1 , a_2 , ..., a_n (1 <= a_i <= n) -- the elements of the first permutation. The third line contains n integers b_1 , b_2 , ..., b_n (1 <= b_i <= n) -- the elements of the second permutation. Print the maximum number of matching pairs of elements after performing the above operations some (possibly zero) times. For the first case: b can be shifted to the right by k = 1 . The resulting permutations will be {1, 2, 3, 4, 5 } and {1, 2, 3, 4, 5 } . For the second case: The operation is not required. For all possible rotations of a and b , the number"...

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
83118195 Aftery142 C June 8, 2020, 9:09 a.m. OK FPC TESTS 77 93 2662400 1400
83117090 Nepumi C June 8, 2020, 8:56 a.m. OK GNU C11 TESTS 77 93 1638400 1400
83386184 rackeh C June 11, 2020, 1:51 p.m. OK GNU C11 TESTS 77 93 2457600 1400
83138856 lwd-haki C June 8, 2020, 1:23 p.m. OK GNU C11 TESTS 77 93 2457600 1400
83385676 rackeh C June 11, 2020, 1:44 p.m. OK GNU C11 TESTS 77 93 2457600 1400
82883085 divyansh_io C June 7, 2020, 7:14 p.m. OK GNU C11 TESTS 77 93 2662400 1400
82882191 divyansh_io C June 7, 2020, 7:04 p.m. OK GNU C11 TESTS 77 93 2662400 1400
83147777 pratyushranjan C June 8, 2020, 3:04 p.m. OK GNU C11 TESTS 77 93 3993600 1400
83474634 _Ayush C June 11, 2020, 6:39 p.m. OK GNU C11 TESTS 77 93 4812800 1400
82878280 Wasif_Hamid C June 7, 2020, 6:31 p.m. OK GNU C11 TESTS 77 108 2662400 1400
83139161 Rahin31 C June 8, 2020, 1:27 p.m. OK GNU C11 TESTS 77 109 1638400 1400
82894584 AyoAyowei C June 7, 2020, 11:47 p.m. OK GNU C++11 TESTS 77 46 1638400 1400
83136392 Thomasguo666 C June 8, 2020, 12:52 p.m. OK GNU C++11 TESTS 77 46 1638400 1400
83175421 drawing_dead C June 8, 2020, 11:30 p.m. OK GNU C++11 TESTS 77 46 2457600 1400
83124721 froggyzhang C June 8, 2020, 10:31 a.m. OK GNU C++11 TESTS 77 46 3174400 1400
83105301 froggyzhang C June 8, 2020, 6:28 a.m. OK GNU C++11 TESTS 77 46 3174400 1400
83089247 yasugongshang C June 8, 2020, 6:27 a.m. OK GNU C++11 TESTS 77 46 3174400 1400
83539288 CN__james1 C June 12, 2020, 2:23 p.m. OK GNU C++11 TESTS 77 46 3174400 1400
83263165 MengWH C June 10, 2020, 2:52 a.m. OK GNU C++11 TESTS 77 46 3481600 1400
83535116 zqrtxdy C June 12, 2020, 1:34 p.m. OK GNU C++11 TESTS 77 46 3788800 1400
83535111 vjudge4 C June 12, 2020, 1:33 p.m. OK GNU C++11 TESTS 77 46 3788800 1400
83519103 HipHop C June 12, 2020, 10:07 a.m. OK GNU C++14 TESTS 77 93 1843200 1400
83021380 abcd227 C June 8, 2020, 5:38 a.m. OK GNU C++14 TESTS 77 93 6348800 1400
83380385 canescens C June 11, 2020, 12:31 p.m. OK GNU C++14 TESTS 77 109 2355200 1400
83137156 Numan2962 C June 8, 2020, 1:01 p.m. OK GNU C++14 TESTS 77 109 2457600 1400
83113002 toxicviper C June 8, 2020, 8:06 a.m. OK GNU C++14 TESTS 77 109 2662400 1400
83138499 vladand C June 8, 2020, 1:19 p.m. OK GNU C++14 TESTS 77 109 2662400 1400
83256495 nick2004 C June 9, 2020, 10:15 p.m. OK GNU C++14 TESTS 77 109 3174400 1400
82881101 McCheng C June 7, 2020, 6:53 p.m. OK GNU C++14 TESTS 77 109 3174400 1400
83151958 jewel.elias9 C June 8, 2020, 3:46 p.m. OK GNU C++14 TESTS 77 109 3174400 1400
83543583 ____ALPHA____ C June 12, 2020, 3:13 p.m. OK GNU C++14 TESTS 77 109 3481600 1400
83206136 _andyli C June 9, 2020, 9:47 a.m. OK GNU C++17 TESTS 77 46 8499200 1400
83108756 gihewapos C June 8, 2020, 7:10 a.m. OK GNU C++17 TESTS 77 93 2355200 1400
83113669 Shekh_Ashraful C June 8, 2020, 8:13 a.m. OK GNU C++17 TESTS 77 93 2355200 1400
82894849 Duwvux C June 7, 2020, 11:59 p.m. OK GNU C++17 TESTS 77 93 3993600 1400
83233969 agent-q1 C June 9, 2020, 3:32 p.m. OK GNU C++17 TESTS 77 109 2764800 1400
83119196 nnsp635 C June 8, 2020, 9:21 a.m. OK GNU C++17 TESTS 77 109 3174400 1400
83107218 penubo C June 8, 2020, 6:51 a.m. OK GNU C++17 TESTS 77 109 3174400 1400
83248448 dg25 C June 9, 2020, 6:50 p.m. OK GNU C++17 TESTS 77 109 3174400 1400
83137083 bl4ckfr05t C June 8, 2020, 1 p.m. OK GNU C++17 TESTS 77 109 3174400 1400
83109414 ayuhero31 C June 8, 2020, 7:19 a.m. OK GNU C++17 TESTS 77 109 3174400 1400
82900560 StarInShadow C June 8, 2020, 2:54 a.m. OK GNU C++17 (64) TESTS 77 77 1638400 1400
83173350 Khostiqa C June 8, 2020, 9:52 p.m. OK GNU C++17 (64) TESTS 77 77 2457600 1400
83123660 _Helen C June 8, 2020, 10:17 a.m. OK GNU C++17 (64) TESTS 77 77 3174400 1400
82971438 amazing123 C June 8, 2020, 5:06 a.m. OK GNU C++17 (64) TESTS 77 77 3174400 1400
83139994 Phortox C June 8, 2020, 1:37 p.m. OK GNU C++17 (64) TESTS 77 77 6451200 1400
83251207 smax C June 9, 2020, 7:38 p.m. OK GNU C++17 (64) TESTS 77 78 1638400 1400
82892412 danielvitor23 C June 7, 2020, 10:15 p.m. OK GNU C++17 (64) TESTS 77 78 1638400 1400
83173107 Khostiqa C June 8, 2020, 9:42 p.m. OK GNU C++17 (64) TESTS 77 78 2457600 1400
83176972 Bekh C June 9, 2020, 12:41 a.m. OK GNU C++17 (64) TESTS 77 78 2457600 1400
83240100 sushkov.pv C June 9, 2020, 4:48 p.m. OK GNU C++17 (64) TESTS 77 78 2457600 1400
83111158 synapse C June 8, 2020, 7:41 a.m. OK Go TESTS 77 61 1024000 1400
83110326 synapse C June 8, 2020, 7:31 a.m. OK Go TESTS 77 249 4812800 1400
83274026 NGUYEN_THANH_LOI C June 10, 2020, 6:35 a.m. OK Go TESTS 77 265 4300800 1400
82896284 sighduck C June 8, 2020, 12:53 a.m. OK Go TESTS 77 280 5324800 1400
83334242 odomontois C June 10, 2020, 8:31 p.m. OK Haskell TESTS 77 202 12800000 1400
83290311 rajparekh2024 C June 10, 2020, 10:27 a.m. OK Java 11 TESTS 77 202 0 1400
83338629 Rivano C June 10, 2020, 11:05 p.m. OK Java 11 TESTS 77 234 204800 1400
82880135 moksh19177 C June 7, 2020, 6:44 p.m. OK Java 11 TESTS 77 249 2764800 1400
83143622 noahlewis.ca C June 8, 2020, 2:20 p.m. OK Java 11 TESTS 77 249 3584000 1400
83131871 decoder_1671 C June 8, 2020, 11:57 a.m. OK Java 11 TESTS 77 264 1536000 1400
83119892 harshitgulati11 C June 8, 2020, 9:30 a.m. OK Java 11 TESTS 77 264 1536000 1400
82882652 nafiz6 C June 7, 2020, 7:09 p.m. OK Java 11 TESTS 77 264 1740800 1400
82903469 zhupeijun C June 8, 2020, 3:53 a.m. OK Java 11 TESTS 77 264 2867200 1400
83124679 chaparasagar C June 8, 2020, 10:30 a.m. OK Java 11 TESTS 77 264 4505600 1400
83340378 Clowyy C June 11, 2020, 12:39 a.m. OK Java 11 TESTS 77 265 10137600 1400
83159490 onefineday01 C June 8, 2020, 5:23 p.m. OK Java 8 TESTS 77 124 0 1400
83507725 sudhakar005 C June 12, 2020, 7:28 a.m. OK Java 8 TESTS 77 124 0 1400
83297378 shashwat07 C June 10, 2020, 12:05 p.m. OK Java 8 TESTS 77 124 0 1400
83116582 bluesky111 C June 8, 2020, 8:49 a.m. OK Java 8 TESTS 77 124 0 1400
82902941 cis_pie C June 8, 2020, 3:43 a.m. OK Java 8 TESTS 77 124 0 1400
82901610 Manan8686 C June 8, 2020, 3:17 a.m. OK Java 8 TESTS 77 124 0 1400
82880786 nikhil_supertramp C June 7, 2020, 6:50 p.m. OK Java 8 TESTS 77 124 0 1400
82890801 Nirav412000 C June 7, 2020, 9:28 p.m. OK Java 8 TESTS 77 139 0 1400
83374698 labdhi C June 11, 2020, 11:14 a.m. OK Java 8 TESTS 77 140 0 1400
83522987 mr___hacker____ C June 12, 2020, 10:58 a.m. OK Java 8 TESTS 77 140 0 1400
82902192 Spheniscine C June 8, 2020, 3:29 a.m. OK Kotlin TESTS 77 202 512000 1400
83168326 shivam1420 C June 8, 2020, 7:36 p.m. OK Kotlin TESTS 77 405 27340800 1400
83136296 whiter4bbit C June 8, 2020, 12:51 p.m. OK Kotlin TESTS 77 545 23654400 1400
82894491 xwood C June 7, 2020, 11:44 p.m. OK Kotlin TESTS 77 576 23654400 1400
83118742 aandrrei C June 8, 2020, 9:15 a.m. OK Kotlin TESTS 77 811 68608000 1400
83124206 Yupiteru C June 8, 2020, 10:24 a.m. OK Mono C# TESTS 77 155 26726400 1400
82877533 peterc C June 7, 2020, 6:27 p.m. OK Mono C# TESTS 77 186 33280000 1400
83230342 TRR C June 9, 2020, 2:55 p.m. OK Mono C# TESTS 77 187 33075200 1400
83484913 Mosyagin C June 11, 2020, 10:27 p.m. OK Mono C# TESTS 77 187 34508800 1400
82887397 jankmet C June 7, 2020, 8:13 p.m. OK Mono C# TESTS 77 187 34713600 1400
83168878 treasuryonly C June 8, 2020, 7:48 p.m. OK Mono C# TESTS 77 187 34713600 1400
83570402 eSeF_ C June 13, 2020, 1:37 a.m. OK Mono C# TESTS 77 202 37683200 1400
83116954 _Trung_Nguyen C June 8, 2020, 8:54 a.m. OK Mono C# TESTS 77 202 42291200 1400
83168659 treasuryonly C June 8, 2020, 7:43 p.m. OK Mono C# TESTS 77 217 46182400 1400
82887240 faxse C June 7, 2020, 8:10 p.m. OK Mono C# TESTS 77 265 56627200 1400
83224879 olpetOdessaONU C June 9, 2020, 1:54 p.m. OK MS C++ TESTS 77 93 4812800 1400
82896820 zaid_qassas1 C June 8, 2020, 1:12 a.m. OK MS C++ TESTS 77 280 2662400 1400
83358877 acrux C June 11, 2020, 7:35 a.m. OK MS C++ 2017 TESTS 77 233 7168000 1400
83185877 Shify C June 9, 2020, 4:59 a.m. OK MS C++ 2017 TESTS 77 312 1638400 1400
83366357 getN1ght C June 11, 2020, 9:20 a.m. OK MS C++ 2017 TESTS 77 312 2457600 1400
83347347 skkuinkwan1205 C June 11, 2020, 4:12 a.m. OK MS C++ 2017 TESTS 77 312 2457600 1400
83361336 NadaAdel C June 11, 2020, 8:10 a.m. OK MS C++ 2017 TESTS 77 312 6348800 1400
83242900 TMHazem C June 9, 2020, 5:26 p.m. OK MS C++ 2017 TESTS 77 312 14336000 1400
83232886 amar277 C June 9, 2020, 3:21 p.m. OK MS C++ 2017 TESTS 77 327 2457600 1400
83185807 Shify C June 9, 2020, 4:58 a.m. OK MS C++ 2017 TESTS 77 327 2457600 1400
83378030 lxga C June 11, 2020, noon OK MS C++ 2017 TESTS 77 327 3174400 1400
82886556 ilya_totl C June 7, 2020, 7:59 p.m. OK MS C++ 2017 TESTS 77 327 4812800 1400
83224912 arpit2438735 C June 9, 2020, 1:54 p.m. OK Node.js TESTS 77 249 32972800 1400
83355457 yinlei C June 11, 2020, 6:46 a.m. OK PHP TESTS 77 139 44134400 1400
83355315 yinlei C June 11, 2020, 6:44 a.m. OK PHP TESTS 77 171 44134400 1400
82886888 realnimish C June 7, 2020, 8:04 p.m. OK PyPy 2 TESTS 77 233 19251200 1400
83293259 KILLER_CODER C June 10, 2020, 11:09 a.m. OK PyPy 3 TESTS 77 233 20070400 1400
83486368 PavelJunior C June 11, 2020, 11:31 p.m. OK PyPy 3 TESTS 77 233 20582400 1400
83166646 UTMoonlight C June 8, 2020, 7:05 p.m. OK PyPy 3 TESTS 77 233 24371200 1400
82903782 tirtho2107 C June 8, 2020, 3:58 a.m. OK PyPy 3 TESTS 77 311 30105600 1400
82899025 sanjeevkumar113f C June 8, 2020, 2:19 a.m. OK PyPy 3 TESTS 77 327 32256000 1400
83293204 KILLER_CODER C June 10, 2020, 11:09 a.m. OK PyPy 3 TESTS 77 358 24371200 1400
83295119 KILLER_CODER C June 10, 2020, 11:35 a.m. OK PyPy 3 TESTS 77 358 26316800 1400
82879456 Aestroix C June 7, 2020, 6:39 p.m. OK PyPy 3 TESTS 77 358 40243200 1400
83106028 unknown_2433 C June 8, 2020, 6:37 a.m. OK PyPy 3 TESTS 77 374 28569600 1400
83265962 WaluntOvO C June 10, 2020, 4:05 a.m. OK PyPy 3 TESTS 77 389 19456000 1400
82895227 bertrandovide C June 8, 2020, 12:14 a.m. OK Python 2 TESTS 77 639 33792000 1400
83119400 hooded_sweater C June 8, 2020, 9:23 a.m. OK Python 2 TESTS 77 982 59699200 1400
82880109 Schups C June 7, 2020, 6:44 p.m. OK Python 3 TESTS 77 342 29081600 1400
83268658 harshalsinha437 C June 10, 2020, 5:07 a.m. OK Python 3 TESTS 77 374 19148800 1400
83200777 Optimismy C June 9, 2020, 8:36 a.m. OK Python 3 TESTS 77 390 27955200 1400
83162088 vasanthaganesh C June 8, 2020, 5:57 p.m. OK Python 3 TESTS 77 390 29593600 1400
83231668 rv404674 C June 9, 2020, 3:09 p.m. OK Python 3 TESTS 77 404 22835200 1400
82903817 safal.gupta001 C June 8, 2020, 3:59 a.m. OK Python 3 TESTS 77 405 19148800 1400
83293363 iamshaypatriccormac C June 10, 2020, 11:11 a.m. OK Python 3 TESTS 77 405 20070400 1400
83089085 sh1194 C June 8, 2020, 6:25 a.m. OK Python 3 TESTS 77 405 22425600 1400
83231719 Yash_Chimata C June 9, 2020, 3:09 p.m. OK Python 3 TESTS 77 405 22835200 1400
83122639 Tarun_122 C June 8, 2020, 10:05 a.m. OK Python 3 TESTS 77 405 22835200 1400
82904138 FidFenix C June 8, 2020, 4:04 a.m. OK Ruby TESTS 77 483 62361600 1400
83501171 Rara. C June 12, 2020, 5:49 a.m. OK Ruby TESTS 77 701 64000000 1400
83500083 Rara. C June 12, 2020, 5:33 a.m. OK Ruby TESTS 77 842 82329600 1400
83387172 Andrey_R C June 11, 2020, 2:04 p.m. OK Rust TESTS 77 46 5836800 1400
83374249 cotton100pc C June 11, 2020, 11:09 a.m. OK Rust TESTS 77 46 6246400 1400
83497725 t-uchida C June 12, 2020, 4:54 a.m. OK Rust TESTS 77 62 5836800 1400
83199089 shion_ C June 9, 2020, 8:15 a.m. OK Rust TESTS 77 77 14028800 1400
83174728 kobae964 C June 8, 2020, 10:53 p.m. OK Rust TESTS 77 202 7782400 1400

remove filters

Back to search problems