Codeforces Round 601 (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
1255 Codeforces Round 601 (Div. 2) FINISHED False 7200 163265087 Nov. 19, 2019, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 6783 ) C League of Leesins PROGRAMMING constructive algorithms implementation 1600

B'Bob is an avid fan of the video game "League of Leesins", and today he celebrates as the League of Leesins World Championship comes to an end! The tournament consisted of n ( n ge 5 ) teams around the world. Before the tournament starts, Bob has made a prediction of the rankings of each team, from 1 -st to n -th. After the final, he compared the prediction with the actual result and found out that the i -th team according to his prediction ended up at the p_i -th position ( 1 <= p_i <= n , all p_i are unique). In other words, p is a permutation of 1, 2, ... , n . As Bob 's favorite League player is the famous "3ga", he decided to write down every 3 consecutive elements of the permutation p . Formally, Bob created an array q of n-2 triples, where q_i = (p_i, p_{i+1}, p_{i+2}) for each 1 <= i <= n-2 . Bob was very proud of his array, so he showed it to his friend Alice. After learning of Bob 's array, Alice declared that she could retrieve the permutation p even if Bob rearranges the elements of q and the elements within each triple. Of course, Bob did not believe in such magic, so he did just the same as above to see Alice 's respond. For example, if n = 5 and p = [1, 4, 2, 3, 5] , then the original array q will be [(1, 4, 2), (4, 2, 3), (2, 3, 5)] . Bob can then rearrange the numbers within each triple and the positions of the triples to get [(4, 3, 2), (2, 3, 5), (4, 1, 2)] . Note that [(1, 4, 2), (4, 2, 2), (3, 3, 5)] is not a valid rearrangement of q , as Bob is not allowed to swap numbers belong to different triples. As Alice 's friend, you know for sure that Alice was just trying to show off, so you decided to save her some face by giving her any permutation p that is consistent with the array q she was given. The first line contains a single integer n ( 5 <= n <= 10^5 ) -- the size of per'...

Tutorials

Codeforces Round #601 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
65380517 daut-dlang C Nov. 19, 2019, 4:06 p.m. OK D TESTS 41 233 11878400 1600
65385951 ruban C Nov. 19, 2019, 4:25 p.m. OK Delphi TESTS 41 156 91545600 1600
65403424 YOK C Nov. 20, 2019, 1:02 a.m. OK GNU C11 TESTS 41 390 2457600 1600
65397682 rainboy C Nov. 19, 2019, 7:53 p.m. OK GNU C11 TESTS 41 390 2457600 1600
65479250 singerl C Nov. 21, 2019, 11:09 a.m. OK GNU C11 TESTS 41 390 3174400 1600
65367159 pengin_2000 C Nov. 19, 2019, 3:17 p.m. OK GNU C11 TESTS 41 390 3584000 1600
65495588 akash19jain C Nov. 21, 2019, 4:26 p.m. OK GNU C11 TESTS 41 390 6348800 1600
65508366 kaiboy C Nov. 22, 2019, 1:25 a.m. OK GNU C11 TESTS 41 405 2457600 1600
66237271 Rahul_cpp C Dec. 3, 2019, 4:40 p.m. OK GNU C11 TESTS 41 405 2867200 1600
65424567 BeNoble C Nov. 20, 2019, 10:16 a.m. OK GNU C++11 TESTS 41 46 7065600 1600
65894019 Ultflash C Nov. 28, 2019, 5:05 a.m. OK GNU C++11 TESTS 41 61 2764800 1600
65370305 youngsystem C Nov. 19, 2019, 3:27 p.m. OK GNU C++11 TESTS 41 62 4096000 1600
65413848 alicealicealice C Nov. 20, 2019, 5:52 a.m. OK GNU C++11 TESTS 41 62 13619200 1600
65422707 LengYun C Nov. 20, 2019, 9:32 a.m. OK GNU C++11 TESTS 41 62 49664000 1600
65476387 fnoigsh C Nov. 21, 2019, 10:14 a.m. OK GNU C++11 TESTS 41 77 4812800 1600
65433796 ydh C Nov. 20, 2019, 12:48 p.m. OK GNU C++11 TESTS 41 78 3072000 1600
66207062 meiz C Dec. 3, 2019, 4:02 a.m. OK GNU C++11 TESTS 41 78 3174400 1600
65487719 A_Big_Jiong C Nov. 21, 2019, 1:39 p.m. OK GNU C++11 TESTS 41 78 4710400 1600
65416589 zzuli-hanjk C Nov. 20, 2019, 7:09 a.m. OK GNU C++11 TESTS 41 78 5120000 1600
65409505 JJH_QAQ C Nov. 20, 2019, 3:04 a.m. OK GNU C++14 TESTS 41 93 3993600 1600
65410046 21181522 C Nov. 20, 2019, 3:30 a.m. OK GNU C++14 TESTS 41 93 4096000 1600
65409747 NoTeamName C Nov. 20, 2019, 3:15 a.m. OK GNU C++14 TESTS 41 93 12083200 1600
65366959 yzzzwd C Nov. 19, 2019, 3:17 p.m. OK GNU C++14 TESTS 41 108 5222400 1600
65799538 clearlove4396 C Nov. 27, 2019, 6:47 a.m. OK GNU C++14 TESTS 41 108 17612800 1600
65383246 SpringsVGC C Nov. 19, 2019, 4:16 p.m. OK GNU C++14 TESTS 41 109 3174400 1600
66270448 nks43 C Dec. 4, 2019, 12:07 p.m. OK GNU C++14 TESTS 41 109 6656000 1600
65897671 Dream_Tonight C Nov. 28, 2019, 7:06 a.m. OK GNU C++14 TESTS 41 109 8294400 1600
65383414 MyDaath C Nov. 19, 2019, 4:16 p.m. OK GNU C++14 TESTS 41 109 9318400 1600
65462404 Zhanzhe_Lee C Nov. 21, 2019, 3:20 a.m. OK GNU C++14 TESTS 41 109 13414400 1600
68558352 carbocation C Jan. 10, 2020, 6:12 p.m. OK GNU C++17 TESTS 41 93 3174400 1600
65414012 chaiyihan C Nov. 20, 2019, 5:58 a.m. OK GNU C++17 TESTS 41 93 3276800 1600
66865673 xucanxx C Dec. 14, 2019, 12:52 p.m. OK GNU C++17 TESTS 41 93 3584000 1600
65931755 Melecichu C Nov. 28, 2019, 9:32 p.m. OK GNU C++17 TESTS 41 93 4505600 1600
69088923 FireCracker8_35 C Jan. 19, 2020, 9:25 a.m. OK GNU C++17 TESTS 41 93 5632000 1600
65433358 zust-oldsaltyfish C Nov. 20, 2019, 12:41 p.m. OK GNU C++17 TESTS 41 108 5222400 1600
65379342 demor C Nov. 19, 2019, 4:02 p.m. OK GNU C++17 TESTS 41 108 8499200 1600
65385726 zhangrongxin C Nov. 19, 2019, 4:24 p.m. OK GNU C++17 TESTS 41 108 20070400 1600
65482703 satur C Nov. 21, 2019, 12:11 p.m. OK GNU C++17 TESTS 41 109 1945600 1600
65379198 chankyin C Nov. 19, 2019, 4:01 p.m. OK GNU C++17 TESTS 41 109 2867200 1600
65565163 maguroguma C Nov. 23, 2019, 5:32 a.m. OK Go TESTS 41 264 37171200 1600
65386162 maguroguma C Nov. 19, 2019, 4:26 p.m. OK Go TESTS 41 296 37171200 1600
65376354 Dekedro C Nov. 19, 2019, 3:49 p.m. OK Go TESTS 41 358 14336000 1600
65403120 z20124528 C Nov. 20, 2019, 12:42 a.m. OK Go TESTS 41 577 4505600 1600
65419110 synapse C Nov. 20, 2019, 8:14 a.m. OK Go TESTS 41 607 58880000 1600
66090521 lpls1 C Dec. 1, 2019, 7:10 a.m. OK Java 11 TESTS 41 389 17408000 1600
65409756 Garett C Nov. 20, 2019, 3:16 a.m. OK Java 11 TESTS 41 436 17817600 1600
65932312 atarw C Nov. 28, 2019, 9:55 p.m. OK Java 11 TESTS 41 451 18534400 1600
65380403 elkadymohammed01 C Nov. 19, 2019, 4:05 p.m. OK Java 11 TESTS 41 452 18227200 1600
65756664 Azakarka C Nov. 26, 2019, 2:14 p.m. OK Java 11 TESTS 41 530 38502400 1600
66243340 machhra C Dec. 3, 2019, 7:09 p.m. OK Java 11 TESTS 41 561 36966400 1600
65385791 codingalways C Nov. 19, 2019, 4:24 p.m. OK Java 11 TESTS 41 577 39014400 1600
65397681 Dukkha C Nov. 19, 2019, 7:53 p.m. OK Java 11 TESTS 41 592 0 1600
65399635 davisrollman C Nov. 19, 2019, 9:01 p.m. OK Java 11 TESTS 41 654 33894400 1600
65371861 its_aks_ulure C Nov. 19, 2019, 3:33 p.m. OK Java 11 TESTS 41 717 37478400 1600
65377783 ekaerovets C Nov. 19, 2019, 3:56 p.m. OK Java 8 TESTS 41 202 0 1600
66533481 insane_28 C Dec. 9, 2019, 8:33 a.m. OK Java 8 TESTS 41 233 4096000 1600
65562537 NguyenHungCuong C Nov. 23, 2019, 3:57 a.m. OK Java 8 TESTS 41 265 71475200 1600
65376067 gouh9qn C Nov. 19, 2019, 3:48 p.m. OK Java 8 TESTS 41 280 0 1600
65460101 bluesky111 C Nov. 21, 2019, 1:03 a.m. OK Java 8 TESTS 41 295 17408000 1600
65564773 NguyenHungCuong C Nov. 23, 2019, 5:20 a.m. OK Java 8 TESTS 41 295 71475200 1600
65366660 pulkit1411 C Nov. 19, 2019, 3:16 p.m. OK Java 8 TESTS 41 296 0 1600
65698854 monsterr C Nov. 25, 2019, 9:45 a.m. OK Java 8 TESTS 41 327 9420800 1600
65513775 dipankar.invi C Nov. 22, 2019, 5:45 a.m. OK Java 8 TESTS 41 327 16998400 1600
65459512 bluesky111 C Nov. 21, 2019, 12:20 a.m. OK Java 8 TESTS 41 327 17408000 1600
65409236 Spheniscine C Nov. 20, 2019, 2:51 a.m. OK Kotlin TESTS 41 296 7680000 1600
65409164 Spheniscine C Nov. 20, 2019, 2:48 a.m. OK Kotlin TESTS 41 296 7680000 1600
65409304 Spheniscine C Nov. 20, 2019, 2:54 a.m. OK Kotlin TESTS 41 312 7680000 1600
65409002 Spheniscine C Nov. 20, 2019, 2:41 a.m. OK Kotlin TESTS 41 327 17817600 1600
65391723 Glushen C Nov. 19, 2019, 5:45 p.m. OK Kotlin TESTS 41 670 29593600 1600
66619464 Java C Dec. 11, 2019, 6:18 a.m. OK Kotlin TESTS 41 748 30720000 1600
65538980 yudedako C Nov. 22, 2019, 3:18 p.m. OK Kotlin TESTS 41 795 20787200 1600
66622374 shenqi16 C Dec. 11, 2019, 7:31 a.m. OK Kotlin TESTS 41 811 49254400 1600
65399565 songsinger C Nov. 19, 2019, 8:58 p.m. OK Kotlin TESTS 41 1200 63795200 1600
65382272 artworks C Nov. 19, 2019, 4:12 p.m. OK Mono C# TESTS 41 374 29081600 1600
65371835 tomomo2b2 C Nov. 19, 2019, 3:32 p.m. OK Mono C# TESTS 41 404 27033600 1600
65372615 eki C Nov. 19, 2019, 3:35 p.m. OK Mono C# TESTS 41 576 13721600 1600
65499002 nastya1199 C Nov. 21, 2019, 5:54 p.m. OK Mono C# TESTS 41 607 23347200 1600
65377831 ololonso C Nov. 19, 2019, 3:56 p.m. OK Mono C# TESTS 41 639 19046400 1600
65374136 hibatibati C Nov. 19, 2019, 3:41 p.m. OK Mono C# TESTS 41 717 52121600 1600
65470799 hyzhangzhy C Nov. 21, 2019, 8:19 a.m. OK Mono C# TESTS 41 967 40857600 1600
65380118 plasma-effect C Nov. 19, 2019, 4:04 p.m. OK Mono C# TESTS 41 1045 52326400 1600
65433643 vjudge2 C Nov. 20, 2019, 12:46 p.m. OK MS C++ TESTS 41 92 3174400 1600
65561509 vjudge1 C Nov. 23, 2019, 3:12 a.m. OK MS C++ TESTS 41 93 3584000 1600
65439573 vjudge2 C Nov. 20, 2019, 1:55 p.m. OK MS C++ TESTS 41 93 48128000 1600
65476188 YangYaya C Nov. 21, 2019, 10:10 a.m. OK MS C++ TESTS 41 139 7372800 1600
68757750 vjudge4 C Jan. 14, 2020, 8:18 a.m. OK MS C++ TESTS 41 140 7987200 1600
65532212 vjudge4 C Nov. 22, 2019, 12:52 p.m. OK MS C++ TESTS 41 140 9830400 1600
65489458 vjudge5 C Nov. 21, 2019, 2:02 p.m. OK MS C++ TESTS 41 156 7372800 1600
65532387 vjudge2 C Nov. 22, 2019, 12:56 p.m. OK MS C++ TESTS 41 171 9830400 1600
65578365 vjudge4 C Nov. 23, 2019, 10:11 a.m. OK MS C++ TESTS 41 171 10035200 1600
65430820 vjudge3 C Nov. 20, 2019, 12:01 p.m. OK MS C++ TESTS 41 234 23756800 1600
65388030 Mo_maek C Nov. 19, 2019, 4:32 p.m. OK MS C++ 2017 TESTS 41 109 3481600 1600
65439784 ICEY777 C Nov. 20, 2019, 1:59 p.m. OK MS C++ 2017 TESTS 41 109 3993600 1600
65429933 return-zan C Nov. 20, 2019, 11:47 a.m. OK MS C++ 2017 TESTS 41 124 3788800 1600
65791836 RubyStone C Nov. 26, 2019, 11:28 p.m. OK MS C++ 2017 TESTS 41 124 6348800 1600
65403305 Conan73 C Nov. 20, 2019, 12:54 a.m. OK MS C++ 2017 TESTS 41 140 4300800 1600
65558041 Guoman C Nov. 23, 2019, 12:27 a.m. OK MS C++ 2017 TESTS 41 155 6553600 1600
65558046 vjudge3 C Nov. 23, 2019, 12:28 a.m. OK MS C++ 2017 TESTS 41 171 6553600 1600
65558056 vjudge2 C Nov. 23, 2019, 12:29 a.m. OK MS C++ 2017 TESTS 41 171 6553600 1600
65507230 RONGER C Nov. 22, 2019, 12:06 a.m. OK MS C++ 2017 TESTS 41 171 6963200 1600
65370559 dkyun C Nov. 19, 2019, 3:28 p.m. OK MS C++ 2017 TESTS 41 171 9523200 1600
65555073 yumtam C Nov. 22, 2019, 9:07 p.m. OK PyPy 2 TESTS 41 514 31641600 1600
65689842 Gaurav1 C Nov. 25, 2019, 3:55 a.m. OK PyPy 2 TESTS 41 545 29491200 1600
65368876 zdbtxdy C Nov. 19, 2019, 3:23 p.m. OK PyPy 2 TESTS 41 686 39526400 1600
65418607 aaa_bbb_ccc C Nov. 20, 2019, 8:02 a.m. OK PyPy 2 TESTS 41 997 24780800 1600
65394210 iamprayush C Nov. 19, 2019, 6:26 p.m. OK PyPy 2 TESTS 41 998 46796800 1600
65418069 aaa_bbb_ccc C Nov. 20, 2019, 7:48 a.m. OK PyPy 2 TESTS 41 1014 24985600 1600
65466106 aaa_bbb_ccc C Nov. 21, 2019, 6 a.m. OK PyPy 2 TESTS 41 1029 23654400 1600
65382686 ram_lalla_hum_aagaye C Nov. 19, 2019, 4:14 p.m. OK PyPy 2 TESTS 41 1279 65433600 1600
65469668 SoSooding C Nov. 21, 2019, 7:50 a.m. OK PyPy 2 TESTS 41 1310 65433600 1600
65417813 aaa_bbb_ccc C Nov. 20, 2019, 7:41 a.m. OK PyPy 2 TESTS 41 1996 23654400 1600
65368835 satyamcse C Nov. 19, 2019, 3:23 p.m. OK PyPy 3 TESTS 41 561 29081600 1600
65383728 nagitaosu C Nov. 19, 2019, 4:18 p.m. OK PyPy 3 TESTS 41 577 27443200 1600
65403008 juppy C Nov. 20, 2019, 12:34 a.m. OK PyPy 3 TESTS 41 607 26419200 1600
65452500 rmyak C Nov. 20, 2019, 6:43 p.m. OK PyPy 3 TESTS 41 607 33177600 1600
65374014 roaris C Nov. 19, 2019, 3:40 p.m. OK PyPy 3 TESTS 41 623 23449600 1600
68118365 mitribunskiy C Jan. 3, 2020, 12:21 p.m. OK PyPy 3 TESTS 41 623 24166400 1600
65474034 Parag_AP C Nov. 21, 2019, 9:22 a.m. OK PyPy 3 TESTS 41 654 26214400 1600
65375650 littlewhywhat C Nov. 19, 2019, 3:47 p.m. OK PyPy 3 TESTS 41 654 26521600 1600
65736961 macleChen C Nov. 26, 2019, 8:18 a.m. OK PyPy 3 TESTS 41 748 26624000 1600
65389085 cgfs10000 C Nov. 19, 2019, 4:34 p.m. OK PyPy 3 TESTS 41 857 29491200 1600
67688906 neuhq_haha C Dec. 27, 2019, 10:11 a.m. OK Python 2 TESTS 41 888 28672000 1600
67771732 soumyasarkar1998 C Dec. 28, 2019, 7:06 a.m. OK Python 2 TESTS 41 888 30822400 1600
65394427 daniel.carlos C Nov. 19, 2019, 6:31 p.m. OK Python 2 TESTS 41 1216 36044800 1600
65998671 Tadek C Nov. 29, 2019, 6:21 p.m. OK Python 3 TESTS 41 732 26009600 1600
65657940 tnowakow C Nov. 24, 2019, 11:15 a.m. OK Python 3 TESTS 41 764 23142400 1600
65657847 tnowakow C Nov. 24, 2019, 11:12 a.m. OK Python 3 TESTS 41 764 23347200 1600
65473971 Parag_AP C Nov. 21, 2019, 9:21 a.m. OK Python 3 TESTS 41 826 19558400 1600
65473850 Parag_AP C Nov. 21, 2019, 9:19 a.m. OK Python 3 TESTS 41 842 19558400 1600
65550470 i_am_bread C Nov. 22, 2019, 6:42 p.m. OK Python 3 TESTS 41 872 19456000 1600
65551001 i_am_bread C Nov. 22, 2019, 6:56 p.m. OK Python 3 TESTS 41 888 19558400 1600
65374726 simamumumumu C Nov. 19, 2019, 3:43 p.m. OK Python 3 TESTS 41 889 31232000 1600
66372617 tushartyagi8750 C Dec. 5, 2019, 11:40 p.m. OK Python 3 TESTS 41 904 21708800 1600
65509332 n0body9200 C Nov. 22, 2019, 2:20 a.m. OK Python 3 TESTS 41 998 33484800 1600

remove filters

Back to search problems