Educational Codeforces Round 133 (Rated for 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
1716 Educational Codeforces Round 133 (Rated for Div. 2) FINISHED False 7200 77642662 Aug. 4, 2022, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 21530 ) B Permutation Chain PROGRAMMING constructive algorithms math

B"A permutation of length n is a sequence of integers from 1 to n such that each integer appears in it exactly once. Let the fixedness of a permutation p be the number of fixed points in it -- the number of positions j such that p_j = j , where p_j is the j -th element of the permutation p . You are asked to build a sequence of permutations a_1, a_2, ... , starting from the identity permutation (permutation a_1 = [1, 2, ... , n] ). Let's call it a permutation chain. Thus, a_i is the i -th permutation of length n . For every i from 2 onwards, the permutation a_i should be obtained from the permutation a_{i-1} by swapping any two elements in it (not necessarily neighboring). The fixedness of the permutation a_i should be strictly lower than the fixedness of the permutation a_{i-1} . Consider some chains for n = 3 : Find the longest permutation chain. If there are multiple longest answers, print any of them. The first line contains a single integer t ( 1 <= t <= 99 ) -- the number of testcases. The only line of each testcase contains a single integer n ( 2 <= n <= 100 ) -- the required length of permutations in the chain. For each testcase, first, print the length of a permutation chain k . Then print k permutations a_1, a_2, ... , a_k . a_1 should be an identity permutation of length n ( [1, 2, ... , n] ). For each i from 2 to k , a_i should be obtained by swapping two elements in a_{i-1} . It should also have a strictly lower fixedness than a_{i-1} . "...

Tutorials

105653

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
167013484 Antroz B Aug. 4, 2022, 5:07 p.m. OK C# 10 TESTS 3 139 11571200
167020780 SP2003 B Aug. 4, 2022, 6:13 p.m. OK Clang++20 Diagnostics TESTS 3 342 0
167020838 SP2003 B Aug. 4, 2022, 6:14 p.m. OK Clang++20 Diagnostics TESTS 3 343 0
167016894 Girniiiii B Aug. 4, 2022, 5:35 p.m. OK GNU C11 TESTS 3 30 0
167044863 rjqcr B Aug. 5, 2022, 1:35 a.m. OK GNU C++14 TESTS 3 77 0
167040360 include_BM B Aug. 5, 2022, midnight OK GNU C++14 TESTS 3 77 0
167056718 sb_412 B Aug. 5, 2022, 4:35 a.m. OK GNU C++14 TESTS 3 77 0
167017993 nirbhaymattu B Aug. 4, 2022, 5:45 p.m. OK GNU C++14 TESTS 3 77 0
167012482 bigdekopon B Aug. 4, 2022, 5 p.m. OK GNU C++14 TESTS 3 77 0
167009170 Maria_Ayman B Aug. 4, 2022, 4:40 p.m. OK GNU C++14 TESTS 3 77 0
167003114 umar2308 B Aug. 4, 2022, 4:23 p.m. OK GNU C++14 TESTS 3 77 0
167002670 aditya_sangwai B Aug. 4, 2022, 4:22 p.m. OK GNU C++14 TESTS 3 77 0
167054715 Wilbert1124 B Aug. 5, 2022, 4:03 a.m. OK GNU C++14 TESTS 3 77 0
167059002 mitanshu2011 B Aug. 5, 2022, 5:10 a.m. OK GNU C++14 TESTS 3 77 0
167022905 H.Tabb B Aug. 4, 2022, 6:37 p.m. OK GNU C++17 TESTS 3 61 0
167005817 pratikkumar399 B Aug. 4, 2022, 4:31 p.m. OK GNU C++17 TESTS 3 61 0
167030395 mr_miraclee B Aug. 4, 2022, 8:22 p.m. OK GNU C++17 TESTS 3 61 0
167012327 ishat_jha B Aug. 4, 2022, 4:59 p.m. OK GNU C++17 TESTS 3 62 0
167061586 spkumar9952 B Aug. 5, 2022, 5:42 a.m. OK GNU C++17 TESTS 3 77 0
167058121 farjum1309 B Aug. 5, 2022, 4:57 a.m. OK GNU C++17 TESTS 3 77 0
167056430 Agumon B Aug. 5, 2022, 4:31 a.m. OK GNU C++17 TESTS 3 77 0
167063024 freakin23 B Aug. 5, 2022, 6 a.m. OK GNU C++17 TESTS 3 77 0
167054460 yogesh1415 B Aug. 5, 2022, 3:59 a.m. OK GNU C++17 TESTS 3 77 0
167055772 GunZaaN B Aug. 5, 2022, 4:21 a.m. OK GNU C++17 TESTS 3 77 0
167011799 yuzian B Aug. 4, 2022, 4:55 p.m. OK GNU C++17 (64) TESTS 3 46 0
167007474 Sanjay_sanjay B Aug. 4, 2022, 4:34 p.m. OK GNU C++17 (64) TESTS 3 61 0
167041621 lucasxia01 B Aug. 5, 2022, 12:35 a.m. OK GNU C++17 (64) TESTS 3 61 0
167039314 govind9532pandey B Aug. 4, 2022, 11:28 p.m. OK GNU C++17 (64) TESTS 3 61 0
167026439 das_sayantan B Aug. 4, 2022, 7:24 p.m. OK GNU C++17 (64) TESTS 3 61 0
167021817 CodeSlayer007 B Aug. 4, 2022, 6:24 p.m. OK GNU C++17 (64) TESTS 3 61 0
167018147 neo_37 B Aug. 4, 2022, 5:47 p.m. OK GNU C++17 (64) TESTS 3 61 0
167018079 hustler_123 B Aug. 4, 2022, 5:46 p.m. OK GNU C++17 (64) TESTS 3 61 0
167017459 RohitRKS B Aug. 4, 2022, 5:40 p.m. OK GNU C++17 (64) TESTS 3 61 0
167000421 Ruturaj007 B Aug. 4, 2022, 4:16 p.m. OK GNU C++17 (64) TESTS 3 61 0
167020106 Tirthsuthar B Aug. 4, 2022, 6:06 p.m. OK GNU C++20 (64) TESTS 3 30 0
167028480 rawalabhinav B Aug. 4, 2022, 7:53 p.m. OK GNU C++20 (64) TESTS 3 30 0
167000788 deadpool28 B Aug. 4, 2022, 4:17 p.m. OK GNU C++20 (64) TESTS 3 31 0
167016003 firebolt17 B Aug. 4, 2022, 5:27 p.m. OK GNU C++20 (64) TESTS 3 31 0
167057632 Mahmoud-Hosam B Aug. 5, 2022, 4:50 a.m. OK GNU C++20 (64) TESTS 3 46 0
167056587 hy0uka B Aug. 5, 2022, 4:33 a.m. OK GNU C++20 (64) TESTS 3 46 0
167056324 10121719np B Aug. 5, 2022, 4:29 a.m. OK GNU C++20 (64) TESTS 3 46 0
167061940 hedgehog.02 B Aug. 5, 2022, 5:47 a.m. OK GNU C++20 (64) TESTS 3 46 0
167061255 sohamhumble B Aug. 5, 2022, 5:39 a.m. OK GNU C++20 (64) TESTS 3 46 0
167058010 rkrupeshkumar345 B Aug. 5, 2022, 4:55 a.m. OK GNU C++20 (64) TESTS 3 46 0
167047565 graceoflives B Aug. 5, 2022, 2:12 a.m. OK Go TESTS 3 139 5017600
167013689 BucketOfNubbins B Aug. 4, 2022, 5:09 p.m. OK Java 11 TESTS 3 202 0
167025267 Utkarsh99 B Aug. 4, 2022, 7:08 p.m. OK Java 11 TESTS 3 217 0
167023538 shahvraj1500 B Aug. 4, 2022, 6:45 p.m. OK Java 11 TESTS 3 217 0
167042831 gawsfbet B Aug. 5, 2022, 1:02 a.m. OK Java 11 TESTS 3 218 0
167010294 ushikawa B Aug. 4, 2022, 4:47 p.m. OK Java 11 TESTS 3 218 0
167009519 x21svage B Aug. 4, 2022, 4:42 p.m. OK Java 11 TESTS 3 218 0
167054263 parascoding1 B Aug. 5, 2022, 3:56 a.m. OK Java 11 TESTS 3 233 0
167021751 deepakjoshi6102 B Aug. 4, 2022, 6:23 p.m. OK Java 11 TESTS 3 233 0
167017016 gurkaran_s B Aug. 4, 2022, 5:36 p.m. OK Java 11 TESTS 3 233 0
167013269 newguy1 B Aug. 4, 2022, 5:05 p.m. OK Java 11 TESTS 3 233 0
167014350 Ali04 B Aug. 4, 2022, 5:14 p.m. OK Java 17 TESTS 3 295 921600
167006587 princeayush04 B Aug. 4, 2022, 4:32 p.m. OK Java 17 TESTS 3 311 0
167010674 priyaroy3370 B Aug. 4, 2022, 4:49 p.m. OK Java 8 TESTS 3 124 12800000
167050133 priyaroy3370 B Aug. 5, 2022, 2:50 a.m. OK Java 8 TESTS 3 140 12800000
167043291 imsd_14 B Aug. 5, 2022, 1:11 a.m. OK Java 8 TESTS 3 140 12902400
167059261 Hajan B Aug. 5, 2022, 5:13 a.m. OK Java 8 TESTS 3 155 0
167010293 Mohamed308 B Aug. 4, 2022, 4:47 p.m. OK Java 8 TESTS 3 155 0
167000454 BhargavModha B Aug. 4, 2022, 4:16 p.m. OK Java 8 TESTS 3 155 0
167017710 Virendra115 B Aug. 4, 2022, 5:43 p.m. OK Java 8 TESTS 3 170 0
167028381 rish1896 B Aug. 4, 2022, 7:51 p.m. OK Java 8 TESTS 3 171 0
167013491 swaggy_baba B Aug. 4, 2022, 5:07 p.m. OK Java 8 TESTS 3 171 0
167041609 Sussykin B Aug. 5, 2022, 12:34 a.m. OK Java 8 TESTS 3 171 12800000
167032897 junehop B Aug. 4, 2022, 9:03 p.m. OK JavaScript TESTS 3 78 1126400
167000193 ambesh_dixit_42 B Aug. 4, 2022, 4:15 p.m. OK MS C++ 2017 TESTS 3 156 0
167020243 justc_o_d_e B Aug. 4, 2022, 6:07 p.m. OK MS C++ 2017 TESTS 3 498 409600
167054339 lyqhh88 B Aug. 5, 2022, 3:57 a.m. OK MS C++ 2017 TESTS 3 514 0
167030223 Tan2K B Aug. 4, 2022, 8:19 p.m. OK MS C++ 2017 TESTS 3 514 0
167026769 Bu1izhnik B Aug. 4, 2022, 7:29 p.m. OK MS C++ 2017 TESTS 3 529 0
167016876 readycoderone B Aug. 4, 2022, 5:35 p.m. OK MS C++ 2017 TESTS 3 530 0
167044080 rttyuii B Aug. 5, 2022, 1:25 a.m. OK MS C++ 2017 TESTS 3 545 0
167000805 Frank_F B Aug. 4, 2022, 4:17 p.m. OK MS C++ 2017 TESTS 3 545 0
167002755 vygodisgreat B Aug. 4, 2022, 4:22 p.m. OK MS C++ 2017 TESTS 3 545 102400
167017679 readycoderone B Aug. 4, 2022, 5:42 p.m. OK MS C++ 2017 TESTS 3 560 0
167004573 aidan1112 B Aug. 4, 2022, 4:28 p.m. OK PyPy 2 TESTS 3 186 819200
167004981 aidan1112 B Aug. 4, 2022, 4:29 p.m. OK PyPy 2 TESTS 3 233 819200
167025388 shriom533 B Aug. 4, 2022, 7:10 p.m. OK PyPy 3 TESTS 3 295 3993600
167001902 karsh B Aug. 4, 2022, 4:20 p.m. OK PyPy 3 TESTS 3 358 5632000
167010058 Protype B Aug. 4, 2022, 4:46 p.m. OK PyPy 3 TESTS 3 467 9932800
167048113 farrellbyu B Aug. 5, 2022, 2:19 a.m. OK PyPy 3-64 TESTS 3 93 3481600
167014121 Wobert B Aug. 4, 2022, 5:12 p.m. OK PyPy 3-64 TESTS 3 93 4812800
167046322 penguin133 B Aug. 5, 2022, 1:53 a.m. OK PyPy 3-64 TESTS 3 108 9728000
167025765 Yusif B Aug. 4, 2022, 7:15 p.m. OK PyPy 3-64 TESTS 3 109 3584000
167005043 vortex222 B Aug. 4, 2022, 4:29 p.m. OK PyPy 3-64 TESTS 3 109 5017600
167016752 kaustavshouvik B Aug. 4, 2022, 5:34 p.m. OK PyPy 3-64 TESTS 3 109 5836800
167012064 biglunchdude B Aug. 4, 2022, 4:57 p.m. OK PyPy 3-64 TESTS 3 124 5734400
167000290 bpcodes B Aug. 4, 2022, 4:16 p.m. OK PyPy 3-64 TESTS 3 124 7782400
167053102 jiangjinjinyxt B Aug. 5, 2022, 3:37 a.m. OK PyPy 3-64 TESTS 3 140 6144000
167035243 toam B Aug. 4, 2022, 9:44 p.m. OK PyPy 3-64 TESTS 3 155 10444800
167052969 theraihanrakib B Aug. 5, 2022, 3:35 a.m. OK Python 3 TESTS 3 77 0
167040292 quique0194 B Aug. 4, 2022, 11:59 p.m. OK Python 3 TESTS 3 264 0
167002787 x_wolf_x B Aug. 4, 2022, 4:22 p.m. OK Python 3 TESTS 3 264 0
167006008 FalconBridge10 B Aug. 4, 2022, 4:31 p.m. OK Python 3 TESTS 3 295 3174400
167001406 srikv B Aug. 4, 2022, 4:19 p.m. OK Python 3 TESTS 3 312 0
167006487 Aakash0770 B Aug. 4, 2022, 4:32 p.m. OK Python 3 TESTS 3 451 0
167016269 SilverGodly B Aug. 4, 2022, 5:29 p.m. OK Python 3 TESTS 3 514 0
167045592 eugalt B Aug. 5, 2022, 1:43 a.m. OK Python 3 TESTS 3 982 0
167038150 zhenfisher B Aug. 4, 2022, 10:52 p.m. OK Python 3 TESTS 3 997 307200
167045293 eugalt B Aug. 5, 2022, 1:40 a.m. OK Python 3 TESTS 3 998 0

remove filters

Back to search problems