Codeforces Round 631 (Div. 2) - Thanks, Denis aramis Shitov!

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
1330 Codeforces Round 631 (Div. 2) - Thanks, Denis aramis Shitov! FINISHED False 7200 145898699 April 3, 2020, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 14081 ) B Dreamoon Likes Permutations PROGRAMMING implementation math 1400

B'The sequence of m integers is called the permutation if it contains all integers from 1 to m exactly once. The number m is called the length of the permutation. Dreamoon has two permutations p_1 and p_2 of non-zero lengths l_1 and l_2 . Now Dreamoon concatenates these two permutations into another sequence a of length l_1 + l_2 . First l_1 elements of a is the permutation p_1 and next l_2 elements of a is the permutation p_2 . You are given the sequence a , and you need to find two permutations p_1 and p_2 . If there are several possible ways to restore them, you should find all of them. (Note that it is also possible that there will be no ways.) The first line contains an integer t ( 1 <= t <= 10 ,000 ) denoting the number of test cases in the input. Each test case contains two lines. The first line contains one integer n ( 2 <= q n <= q 200 ,000 ): the length of a . The second line contains n integers a_1, a_2, ldots, a_n ( 1 <= q a_i <= q n-1 ). The total sum of n is less than 200 ,000 . For each test case, the first line of output should contain one integer k : the number of ways to divide a into permutations p_1 and p_2 . Each of the next k lines should contain two integers l_1 and l_2 ( 1 <= q l_1, l_2 <= q n, l_1 + l_2 = n ), denoting, that it is possible to divide a into two permutations of length l_1 and l_2 ( p_1 is the first l_1 elements of a , and p_2 is the last l_2 elements of a ). You can print solutions in any order. In the first example, two possible ways to divide a into permutations are {1 } + {4, 3, 2, 1 } and {1,4,3,2 } + {1 } . In the second example, the only way to divide a into permutations is {2,4,1,3 } + {2,1 } . In the third example, there a'...

Tutorials

Codeforces Round #631 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
76020063 husainalshehhi B April 9, 2020, 5:18 p.m. OK Clang++17 Diagnostics TESTS 21 498 15769600 1400
75439385 liveoverflow B April 3, 2020, 9:49 p.m. OK Clang++17 Diagnostics TESTS 21 1981 27136000 1400
75454408 ruban B April 4, 2020, 5:02 a.m. OK Delphi TESTS 21 77 183091200 1400
75493610 Madalina_Chirpicinic B April 4, 2020, 2:23 p.m. OK FPC TESTS 21 92 3174400 1400
76047896 STZ2001 B April 10, 2020, 1:29 a.m. OK GNU C11 TESTS 21 62 4812800 1400
75722419 chowdhuryshashwoto B April 7, 2020, 7:44 a.m. OK GNU C11 TESTS 21 77 1638400 1400
75471991 hnust_tanzhongsheng B April 4, 2020, 9:32 a.m. OK GNU C11 TESTS 21 78 1843200 1400
75935860 TooEz B April 8, 2020, 10:45 p.m. OK GNU C11 TESTS 21 93 3174400 1400
76075007 dpritam B April 10, 2020, 9:41 a.m. OK GNU C11 TESTS 21 93 3993600 1400
76036838 shashank_padala B April 9, 2020, 8:33 p.m. OK GNU C11 TESTS 21 93 4812800 1400
75400532 shibohao B April 3, 2020, 4:05 p.m. OK GNU C11 TESTS 21 108 1638400 1400
75439388 _sam__ B April 3, 2020, 9:49 p.m. OK GNU C11 TESTS 21 108 9932800 1400
75630647 hnust_zengwei1 B April 6, 2020, 6:46 a.m. OK GNU C11 TESTS 21 702 1638400 1400
75427859 TARIQ B April 3, 2020, 6:57 p.m. OK GNU C11 TESTS 21 1638 9625600 1400
75491054 LUO__W B April 4, 2020, 1:55 p.m. OK GNU C++11 TESTS 21 30 3993600 1400
75701328 luogu_bot2 B April 6, 2020, 11:30 p.m. OK GNU C++11 TESTS 21 31 1433600 1400
75658344 BF666 B April 6, 2020, 1:02 p.m. OK GNU C++11 TESTS 21 31 1638400 1400
75660430 moonlateQWQ B April 6, 2020, 1:26 p.m. OK GNU C++11 TESTS 21 31 2048000 1400
75618623 luogu_bot4 B April 6, 2020, 2:58 a.m. OK GNU C++11 TESTS 21 31 2048000 1400
75451675 YangChen666 B April 4, 2020, 3:55 a.m. OK GNU C++11 TESTS 21 31 2457600 1400
75427471 Histone B April 3, 2020, 6:53 p.m. OK GNU C++11 TESTS 21 31 2457600 1400
75740063 Nickqw B April 7, 2020, 11:51 a.m. OK GNU C++11 TESTS 21 31 2662400 1400
75610247 jzp B April 5, 2020, 10:02 p.m. OK GNU C++11 TESTS 21 31 2969600 1400
75393971 zhaoleyi1 B April 3, 2020, 3:50 p.m. OK GNU C++11 TESTS 21 31 3174400 1400
75638136 _zay B April 6, 2020, 8:35 a.m. OK GNU C++14 TESTS 21 46 3891200 1400
75445416 fa_555 B April 4, 2020, 12:49 a.m. OK GNU C++14 TESTS 21 46 9523200 1400
75471280 finn0 B April 4, 2020, 9:21 a.m. OK GNU C++14 TESTS 21 62 819200 1400
75821194 Ramu B April 8, 2020, 9:57 a.m. OK GNU C++14 TESTS 21 62 921600 1400
75808574 ramenhead B April 8, 2020, 6:47 a.m. OK GNU C++14 TESTS 21 62 921600 1400
75548721 OVO998244353 B April 5, 2020, 8:33 a.m. OK GNU C++14 TESTS 21 62 921600 1400
75394205 ritesh1340 B April 3, 2020, 3:51 p.m. OK GNU C++14 TESTS 21 62 921600 1400
75396650 andrzej_g B April 3, 2020, 3:56 p.m. OK GNU C++14 TESTS 21 62 1024000 1400
75743364 vjudge2 B April 7, 2020, 12:27 p.m. OK GNU C++14 TESTS 21 62 1024000 1400
75527699 goatzyq B April 5, 2020, 1:19 a.m. OK GNU C++14 TESTS 21 62 1126400 1400
76231956 vjudge4 B April 11, 2020, 4:46 a.m. OK GNU C++17 TESTS 21 61 7987200 1400
75630723 MalikS B April 6, 2020, 6:47 a.m. OK GNU C++17 TESTS 21 62 819200 1400
75451995 janwei B April 4, 2020, 4:04 a.m. OK GNU C++17 TESTS 21 62 921600 1400
75746513 Zagoshipda B April 7, 2020, 1:06 p.m. OK GNU C++17 TESTS 21 62 921600 1400
75630992 vjudge5 B April 6, 2020, 6:51 a.m. OK GNU C++17 TESTS 21 62 1024000 1400
75594980 jh280722 B April 5, 2020, 5:53 p.m. OK GNU C++17 TESTS 21 62 1024000 1400
75620203 DarkestNightmare B April 6, 2020, 3:45 a.m. OK GNU C++17 TESTS 21 62 1126400 1400
75993812 JNU_dh_AK_WF B April 9, 2020, 1:15 p.m. OK GNU C++17 TESTS 21 62 1228800 1400
76063337 creativa B April 10, 2020, 7:01 a.m. OK GNU C++17 TESTS 21 62 1433600 1400
75423929 azzzz B April 3, 2020, 6:19 p.m. OK GNU C++17 TESTS 21 62 1433600 1400
75675436 rky673 B April 6, 2020, 4:18 p.m. OK GNU C++17 (64) TESTS 21 46 3174400 1400
75526663 sushkov.pv B April 5, 2020, 12:31 a.m. OK GNU C++17 (64) TESTS 21 46 3276800 1400
75418794 STommydx B April 3, 2020, 5:40 p.m. OK GNU C++17 (64) TESTS 21 46 3993600 1400
75563618 Vax B April 5, 2020, 11:39 a.m. OK GNU C++17 (64) TESTS 21 61 1433600 1400
75501734 ggdwbg B April 4, 2020, 3:56 p.m. OK GNU C++17 (64) TESTS 21 62 2969600 1400
75643302 DNP B April 6, 2020, 9:54 a.m. OK GNU C++17 (64) TESTS 21 62 3174400 1400
75521879 sushkov.pv B April 4, 2020, 9:32 p.m. OK GNU C++17 (64) TESTS 21 77 1638400 1400
76070652 aeiou1 B April 10, 2020, 8:43 a.m. OK GNU C++17 (64) TESTS 21 77 12595200 1400
75458752 Sj2000 B April 4, 2020, 6:20 a.m. OK GNU C++17 (64) TESTS 21 78 6451200 1400
75456926 whinstone B April 4, 2020, 5:51 a.m. OK GNU C++17 (64) TESTS 21 78 10547200 1400
75439132 codelegend B April 3, 2020, 9:43 p.m. OK Haskell TESTS 21 998 39936000 1400
75655632 boltUsain B April 6, 2020, 12:29 p.m. OK Java 11 TESTS 21 233 0 1400
75614719 Apass.Jack B April 6, 2020, 12:37 a.m. OK Java 11 TESTS 21 233 0 1400
75412681 Shaman_King B April 3, 2020, 4:32 p.m. OK Java 11 TESTS 21 233 0 1400
75566057 TheSawan B April 5, 2020, 12:07 p.m. OK Java 11 TESTS 21 233 204800 1400
75625526 alankritanand001 B April 6, 2020, 5:20 a.m. OK Java 11 TESTS 21 233 716800 1400
75439139 noahlewis.ca B April 3, 2020, 9:43 p.m. OK Java 11 TESTS 21 233 2560000 1400
75617472 jwozniak B April 6, 2020, 2:21 a.m. OK Java 11 TESTS 21 234 0 1400
75442560 SaSoriSaYOra B April 3, 2020, 11:11 p.m. OK Java 11 TESTS 21 234 0 1400
75729635 pennyIsLove B April 7, 2020, 9:36 a.m. OK Java 11 TESTS 21 311 10854400 1400
75444290 hakr_2104 B April 4, 2020, 12:08 a.m. OK Java 11 TESTS 21 311 11059200 1400
75433118 Nirav412000 B April 3, 2020, 8 p.m. OK Java 8 TESTS 21 124 0 1400
75434283 wistful23 B April 3, 2020, 8:18 p.m. OK Java 8 TESTS 21 139 0 1400
75398277 hushojin B April 3, 2020, 4 p.m. OK Java 8 TESTS 21 140 0 1400
75546444 Hemcharan B April 5, 2020, 8:03 a.m. OK Java 8 TESTS 21 140 2048000 1400
75477518 PassedPawn B April 4, 2020, 10:48 a.m. OK Java 8 TESTS 21 155 2048000 1400
75782287 O_E B April 7, 2020, 7:54 p.m. OK Java 8 TESTS 21 155 2150400 1400
75757192 kareem3id B April 7, 2020, 2:56 p.m. OK Java 8 TESTS 21 155 2457600 1400
75575127 manish_98 B April 5, 2020, 1:52 p.m. OK Java 8 TESTS 21 155 13414400 1400
75818453 ZerooCool B April 8, 2020, 9:10 a.m. OK Java 8 TESTS 21 156 2457600 1400
75473708 horseprabhat625 B April 4, 2020, 9:58 a.m. OK Java 8 TESTS 21 156 2560000 1400
75619788 Spheniscine B April 6, 2020, 3:33 a.m. OK Kotlin TESTS 21 170 3993600 1400
75483422 yevhenii_kanivets B April 4, 2020, 12:10 p.m. OK Kotlin TESTS 21 186 5836800 1400
75449636 koboshi B April 4, 2020, 3:03 a.m. OK Kotlin TESTS 21 311 37171200 1400
75460796 Hakiobo B April 4, 2020, 6:50 a.m. OK Kotlin TESTS 21 358 15052800 1400
75397256 shivam1420 B April 3, 2020, 3:57 p.m. OK Kotlin TESTS 21 358 16179200 1400
75459580 Hakiobo B April 4, 2020, 6:32 a.m. OK Kotlin TESTS 21 358 22732800 1400
75931688 slemus B April 8, 2020, 9:10 p.m. OK Kotlin TESTS 21 358 22835200 1400
75398530 programmerr47 B April 3, 2020, 4 p.m. OK Kotlin TESTS 21 451 5017600 1400
75516147 a11eca B April 4, 2020, 7:26 p.m. OK Kotlin TESTS 21 514 17920000 1400
75404986 MaxPylypovych B April 3, 2020, 4:15 p.m. OK Kotlin TESTS 21 670 20889600 1400
75921752 kaifonaft B April 8, 2020, 6:54 p.m. OK Mono C# TESTS 21 108 12288000 1400
75422498 Anastasiya_Andreevna B April 3, 2020, 6:06 p.m. OK Mono C# TESTS 21 140 19046400 1400
75504727 Anastasiya_Andreevna B April 4, 2020, 4:35 p.m. OK Mono C# TESTS 21 140 19046400 1400
76441656 szzz- B April 13, 2020, 2:09 a.m. OK Mono C# TESTS 21 140 27648000 1400
75406264 thetansquared B April 3, 2020, 4:18 p.m. OK Mono C# TESTS 21 155 29798400 1400
75537177 jainchethan87 B April 5, 2020, 5:53 a.m. OK Mono C# TESTS 21 171 47513600 1400
75537251 jainchethan87 B April 5, 2020, 5:55 a.m. OK Mono C# TESTS 21 186 46489600 1400
75396050 TrickyCat B April 3, 2020, 3:55 p.m. OK Mono C# TESTS 21 202 30924800 1400
75406566 ravinem1 B April 3, 2020, 4:19 p.m. OK Mono C# TESTS 21 218 35737600 1400
75589647 genrihbolender B April 5, 2020, 4:44 p.m. OK Mono C# TESTS 21 233 45056000 1400
75824039 vjudge5 B April 8, 2020, 10:32 a.m. OK MS C++ TESTS 21 140 1024000 1400
75663193 vjudge2 B April 6, 2020, 2:02 p.m. OK MS C++ TESTS 21 140 1638400 1400
75577208 YTICpoch B April 5, 2020, 2:14 p.m. OK MS C++ TESTS 21 311 13721600 1400
75468002 kevin19984 B April 4, 2020, 8:33 a.m. OK MS C++ TESTS 21 546 2457600 1400
75417370 theweird B April 3, 2020, 5:33 p.m. OK MS C++ TESTS 21 592 3174400 1400
75467947 kevin19984 B April 4, 2020, 8:32 a.m. OK MS C++ TESTS 21 623 2457600 1400
75800866 vjudge4 B April 8, 2020, 4:23 a.m. OK MS C++ TESTS 21 764 1638400 1400
76325824 Hokage. B April 12, 2020, 12:44 p.m. OK MS C++ TESTS 21 826 4812800 1400
76287980 naitsabes.ezluhcs B April 12, 2020, 5:22 a.m. OK MS C++ 2017 TESTS 21 78 1024000 1400
75669246 dundae B April 6, 2020, 3:10 p.m. OK MS C++ 2017 TESTS 21 78 1638400 1400
75394121 hwqconceptnick B April 3, 2020, 3:51 p.m. OK MS C++ 2017 TESTS 21 78 1638400 1400
75713543 vjudge1 B April 7, 2020, 5:30 a.m. OK MS C++ 2017 TESTS 21 78 3174400 1400
75470448 15756211003 B April 4, 2020, 9:10 a.m. OK MS C++ 2017 TESTS 21 78 3174400 1400
75713508 MTHGHCO B April 7, 2020, 5:30 a.m. OK MS C++ 2017 TESTS 21 78 3174400 1400
75425800 pichulia B April 3, 2020, 6:36 p.m. OK MS C++ 2017 TESTS 21 140 5324800 1400
75586190 catplatypus B April 5, 2020, 3:59 p.m. OK MS C++ 2017 TESTS 21 171 1638400 1400
75398959 Flkanjin B April 3, 2020, 4:01 p.m. OK MS C++ 2017 TESTS 21 187 3993600 1400
75451240 khoabright B April 4, 2020, 3:44 a.m. OK MS C++ 2017 TESTS 21 202 1638400 1400
75427147 bmsdave B April 3, 2020, 6:49 p.m. OK Node.js TESTS 21 452 16998400 1400
76313748 LaPatateCaml B April 12, 2020, 9:59 a.m. OK Ocaml TESTS 21 62 7475200 1400
75573082 mayakin B April 5, 2020, 1:30 p.m. OK PHP TESTS 21 951 89907200 1400
75780433 gatsko B April 7, 2020, 7:26 p.m. OK PyPy 2 TESTS 21 295 27238400 1400
76096774 lebron87 B April 10, 2020, 1:54 p.m. OK PyPy 2 TESTS 21 686 17510400 1400
75409357 PS41 B April 3, 2020, 4:25 p.m. OK PyPy 3 TESTS 21 264 16691200 1400
75523745 m.ni B April 4, 2020, 10:26 p.m. OK PyPy 3 TESTS 21 280 17612800 1400
75522823 Aestroix B April 4, 2020, 9:58 p.m. OK PyPy 3 TESTS 21 295 25395200 1400
75452756 vit_72 B April 4, 2020, 4:25 a.m. OK PyPy 3 TESTS 21 311 16179200 1400
75744765 juppy B April 7, 2020, 12:44 p.m. OK PyPy 3 TESTS 21 311 17305600 1400
75418373 thekushalghosh B April 3, 2020, 5:38 p.m. OK PyPy 3 TESTS 21 311 17510400 1400
75453088 roaris B April 4, 2020, 4:33 a.m. OK PyPy 3 TESTS 21 311 17612800 1400
75661320 nikeshthapa255 B April 6, 2020, 1:38 p.m. OK PyPy 3 TESTS 21 311 21299200 1400
76057624 wattaihei B April 10, 2020, 5:36 a.m. OK PyPy 3 TESTS 21 327 23142400 1400
75485088 Anuranjan_Pandey B April 4, 2020, 12:34 p.m. OK PyPy 3 TESTS 21 327 25088000 1400
75756629 ComptineDunAutreEte B April 7, 2020, 2:50 p.m. OK Python 2 TESTS 21 405 11161600 1400
75395773 Hitikkumar B April 3, 2020, 3:54 p.m. OK Python 2 TESTS 21 467 12492800 1400
75401337 hooded_sweater B April 3, 2020, 4:07 p.m. OK Python 2 TESTS 21 499 24883200 1400
75411740 alan_turingR B April 3, 2020, 4:30 p.m. OK Python 2 TESTS 21 638 23961600 1400
75503181 jha_saurav B April 4, 2020, 4:15 p.m. OK Python 3 TESTS 21 249 14028800 1400
75399490 IceFire B April 3, 2020, 4:03 p.m. OK Python 3 TESTS 21 249 15360000 1400
75395792 pulkit100 B April 3, 2020, 3:54 p.m. OK Python 3 TESTS 21 264 14233600 1400
75561450 perDAYTwo_A B April 5, 2020, 11:12 a.m. OK Python 3 TESTS 21 280 17920000 1400
75410495 SalmonTimo B April 3, 2020, 4:27 p.m. OK Python 3 TESTS 21 280 26112000 1400
75394195 himanshu18038 B April 3, 2020, 3:51 p.m. OK Python 3 TESTS 21 295 22937600 1400
75467534 rummansadik B April 4, 2020, 8:27 a.m. OK Python 3 TESTS 21 311 14233600 1400
75418066 Mashutka B April 3, 2020, 5:36 p.m. OK Python 3 TESTS 21 311 14643200 1400
75463935 amanoswal22 B April 4, 2020, 7:34 a.m. OK Python 3 TESTS 21 311 15257600 1400
76242383 sougatadutta0199 B April 11, 2020, 7:25 a.m. OK Python 3 TESTS 21 311 18534400 1400
75443142 IvanDyachenko B April 3, 2020, 11:28 p.m. OK Scala TESTS 21 857 17715200 1400

remove filters

Back to search problems