Codeforces Round 686 (Div. 3)

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
1454 Codeforces Round 686 (Div. 3) FINISHED False 7200 131037863 Nov. 24, 2020, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 41198 ) A Special Permutation PROGRAMMING constructive algorithms probabilities

B'You are given one integer n ( n > 1 ). Recall that a permutation of length n is an array consisting of n distinct integers from 1 to n in arbitrary order. For example, [2, 3, 1, 5, 4] is a permutation of length 5 , but [1, 2, 2] is not a permutation ( 2 appears twice in the array) and [1, 3, 4] is also not a permutation ( n = 3 but there is 4 in the array). Your task is to find a permutation p of length n that there is no index i ( 1 <= i <= n ) such that p_i = i (so, for all i from 1 to n the condition p_i ne i should be satisfied). You have to answer t independent test cases. If there are several answers, you can print any. It can be proven that the answer exists for each n > 1 . The first line of the input contains one integer t ( 1 <= t <= 100 ) -- the number of test cases. Then t test cases follow. The only line of the test case contains one integer n ( 2 <= n <= 100 ) -- the length of the permutation you have to find. For each test case, print n distinct integers p_1, p_2, ldots, p_n -- a permutation that there is no index i ( 1 <= i <= n ) such that p_i = i (so, for all i from 1 to n the condition p_i ne i should be satisfied). If there are several answers, you can print any. It can be proven that the answer exists for each n > 1 . '...

Tutorials

Codeforces Round #686 (Div. 3) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
99562022 leimingling A Nov. 25, 2020, 1:08 p.m. OK Clang++17 Diagnostics TESTS 2 46 0
99582237 codesamskara A Nov. 25, 2020, 4:48 p.m. OK GNU C11 TESTS 2 15 0
99513324 HuangJinYu A Nov. 25, 2020, 12:34 a.m. OK GNU C11 TESTS 2 30 0
99542842 koushik3888 A Nov. 25, 2020, 9:22 a.m. OK GNU C11 TESTS 2 30 0
99542906 tuly02 A Nov. 25, 2020, 9:23 a.m. OK GNU C11 TESTS 2 31 0
99606353 mshiny_111 A Nov. 26, 2020, 4:13 a.m. OK GNU C11 TESTS 2 31 0
99583843 nizojamanshohan A Nov. 25, 2020, 5:10 p.m. OK GNU C11 TESTS 2 31 0
99556562 koushik3888 A Nov. 25, 2020, 12:08 p.m. OK GNU C11 TESTS 2 31 0
99527871 nobab-siraj A Nov. 25, 2020, 6:22 a.m. OK GNU C11 TESTS 2 31 0
99603678 ryanturner02 A Nov. 26, 2020, 2:52 a.m. OK GNU C11 TESTS 2 31 0
99537113 Anstar019 A Nov. 25, 2020, 8:13 a.m. OK GNU C11 TESTS 2 31 0
99530870 vjudge2 A Nov. 25, 2020, 6:57 a.m. OK GNU C++11 TESTS 2 0 0
99606270 swastikanata A Nov. 26, 2020, 4:10 a.m. OK GNU C++11 TESTS 2 0 0
99586327 andrruola A Nov. 25, 2020, 5:45 p.m. OK GNU C++11 TESTS 2 0 0
99572481 NuSuntRoman1 A Nov. 25, 2020, 3:05 p.m. OK GNU C++11 TESTS 2 0 0
99561604 ordinary_man A Nov. 25, 2020, 1:03 p.m. OK GNU C++11 TESTS 2 0 0
99552203 minhquangpham6 A Nov. 25, 2020, 11:17 a.m. OK GNU C++11 TESTS 2 0 0
99551892 asim2005 A Nov. 25, 2020, 11:13 a.m. OK GNU C++11 TESTS 2 0 0
99533530 Lone_13 A Nov. 25, 2020, 7:28 a.m. OK GNU C++11 TESTS 2 0 0
99521874 sankethv03 A Nov. 25, 2020, 4:32 a.m. OK GNU C++11 TESTS 2 0 0
99515335 M1st A Nov. 25, 2020, 1:54 a.m. OK GNU C++11 TESTS 2 0 0
99556131 SyntaxError01 A Nov. 25, 2020, 12:03 p.m. OK GNU C++14 TESTS 2 0 0
99516992 bmosocute A Nov. 25, 2020, 2:44 a.m. OK GNU C++14 TESTS 2 0 0
99603750 probablypushkar A Nov. 26, 2020, 2:54 a.m. OK GNU C++14 TESTS 2 0 0
99601393 PythonSaxena A Nov. 26, 2020, 1:29 a.m. OK GNU C++14 TESTS 2 0 0
99566994 rajat_shubhra A Nov. 25, 2020, 2:08 p.m. OK GNU C++14 TESTS 2 0 0
99578045 Cander_wills A Nov. 25, 2020, 3:56 p.m. OK GNU C++14 TESTS 2 0 0
99551186 vjudge1 A Nov. 25, 2020, 11:05 a.m. OK GNU C++14 TESTS 2 0 0
99549742 H7GhosT A Nov. 25, 2020, 10:48 a.m. OK GNU C++14 TESTS 2 0 0
99531708 shivank911 A Nov. 25, 2020, 7:07 a.m. OK GNU C++14 TESTS 2 0 0
99530316 devansh.pant02 A Nov. 25, 2020, 6:50 a.m. OK GNU C++14 TESTS 2 0 0
99553448 kennethyonghw A Nov. 25, 2020, 11:31 a.m. OK GNU C++17 TESTS 2 0 0
99546812 Mo_Fathy A Nov. 25, 2020, 10:10 a.m. OK GNU C++17 TESTS 2 0 0
99572951 tzaph_ A Nov. 25, 2020, 3:10 p.m. OK GNU C++17 TESTS 2 0 0
99570713 AshwaniSrivastava A Nov. 25, 2020, 2:50 p.m. OK GNU C++17 TESTS 2 0 0
99545447 zarifhuq786 A Nov. 25, 2020, 9:53 a.m. OK GNU C++17 TESTS 2 0 0
99543240 Emu19103092 A Nov. 25, 2020, 9:27 a.m. OK GNU C++17 TESTS 2 0 0
99540433 abhiswas.patil A Nov. 25, 2020, 8:54 a.m. OK GNU C++17 TESTS 2 0 0
99537427 NguyenTungDuong_A3K24CVP A Nov. 25, 2020, 8:17 a.m. OK GNU C++17 TESTS 2 0 0
99564144 dil_shad22 A Nov. 25, 2020, 1:33 p.m. OK GNU C++17 TESTS 2 0 0
99554787 Sakuya0229 A Nov. 25, 2020, 11:47 a.m. OK GNU C++17 TESTS 2 0 0
99524563 jxust_hzf A Nov. 25, 2020, 5:23 a.m. OK GNU C++17 (64) TESTS 2 0 0
99565076 satya_chaitanya A Nov. 25, 2020, 1:44 p.m. OK GNU C++17 (64) TESTS 2 0 0
99554681 kyon2326 A Nov. 25, 2020, 11:46 a.m. OK GNU C++17 (64) TESTS 2 0 0
99552222 Archerber A Nov. 25, 2020, 11:18 a.m. OK GNU C++17 (64) TESTS 2 0 0
99536505 rakshi20 A Nov. 25, 2020, 8:05 a.m. OK GNU C++17 (64) TESTS 2 0 0
99520448 jxust_hzf A Nov. 25, 2020, 4:05 a.m. OK GNU C++17 (64) TESTS 2 0 0
99517572 LethalPuppy A Nov. 25, 2020, 2:58 a.m. OK GNU C++17 (64) TESTS 2 0 0
99510381 12tqian A Nov. 24, 2020, 10:06 p.m. OK GNU C++17 (64) TESTS 2 0 0
99609567 pinkesh1231 A Nov. 26, 2020, 5:34 a.m. OK GNU C++17 (64) TESTS 2 15 0
99610461 adi2710 A Nov. 26, 2020, 5:51 a.m. OK GNU C++17 (64) TESTS 2 15 0
99530667 synapse A Nov. 25, 2020, 6:55 a.m. OK Go TESTS 2 31 0
99535994 Holmes7 A Nov. 25, 2020, 7:58 a.m. OK Go TESTS 2 46 0
99585836 Ipper A Nov. 25, 2020, 5:38 p.m. OK Haskell TESTS 2 15 0
99551718 nirvana_rsc A Nov. 25, 2020, 11:11 a.m. OK Java 11 TESTS 2 171 0
99517071 aschugunov A Nov. 25, 2020, 2:46 a.m. OK Java 11 TESTS 2 171 0
99514516 gambler147go A Nov. 25, 2020, 1:24 a.m. OK Java 11 TESTS 2 171 0
99512961 Mostafa_Murad A Nov. 25, 2020, 12:18 a.m. OK Java 11 TESTS 2 171 0
99593102 zenilharia26 A Nov. 25, 2020, 7:49 p.m. OK Java 11 TESTS 2 171 0
99536508 LordOrbit A Nov. 25, 2020, 8:05 a.m. OK Java 11 TESTS 2 186 0
99545714 Marvel999 A Nov. 25, 2020, 9:57 a.m. OK Java 11 TESTS 2 186 0
99516078 sunnyguan A Nov. 25, 2020, 2:19 a.m. OK Java 11 TESTS 2 186 0
99511092 nikhiljayakumar A Nov. 24, 2020, 10:38 p.m. OK Java 11 TESTS 2 187 0
99603952 lawarganayra A Nov. 26, 2020, 3 a.m. OK Java 11 TESTS 2 202 0
99510941 ranveerrandhawa2468 A Nov. 24, 2020, 10:31 p.m. OK Java 8 TESTS 2 77 0
99601075 youwot A Nov. 26, 2020, 1:17 a.m. OK Java 8 TESTS 2 77 0
99611170 husein.07 A Nov. 26, 2020, 6:04 a.m. OK Java 8 TESTS 2 77 0
99513576 sumitnitesh123 A Nov. 25, 2020, 12:45 a.m. OK Java 8 TESTS 2 92 0
99551675 harshitContest A Nov. 25, 2020, 11:11 a.m. OK Java 8 TESTS 2 93 0
99608692 a_2410 A Nov. 26, 2020, 5:15 a.m. OK Java 8 TESTS 2 93 0
99577437 ajaysinghsisodia A Nov. 25, 2020, 3:50 p.m. OK Java 8 TESTS 2 93 0
99568127 YahiaSherif A Nov. 25, 2020, 2:21 p.m. OK Java 8 TESTS 2 93 0
99553917 jakejase2 A Nov. 25, 2020, 11:37 a.m. OK Java 8 TESTS 2 93 0
99550705 bake_a_boo A Nov. 25, 2020, 10:59 a.m. OK Java 8 TESTS 2 93 0
99510738 tscha A Nov. 24, 2020, 10:22 p.m. OK Kotlin TESTS 2 93 1024000
99568888 dopefresh A Nov. 25, 2020, 2:31 p.m. OK Kotlin TESTS 2 108 0
99560778 sid9406 A Nov. 25, 2020, 12:52 p.m. OK Kotlin TESTS 2 108 1433600
99523303 Hemcharan A Nov. 25, 2020, 5:01 a.m. OK Kotlin TESTS 2 109 0
99550831 cmplx-xyttmt A Nov. 25, 2020, 11:01 a.m. OK Kotlin TESTS 2 109 102400
99546043 SlavaG A Nov. 25, 2020, 10:01 a.m. OK Kotlin TESTS 2 124 0
99513381 Spheniscine A Nov. 25, 2020, 12:37 a.m. OK Kotlin TESTS 2 124 1126400
99522760 ajayking9627 A Nov. 25, 2020, 4:50 a.m. OK Kotlin TESTS 2 155 0
99600920 BugLeave A Nov. 26, 2020, 1:10 a.m. OK Mono C# TESTS 2 46 0
99584219 alexeylushch A Nov. 25, 2020, 5:15 p.m. OK Mono C# TESTS 2 62 204800
99586200 Yaman0110 A Nov. 25, 2020, 5:43 p.m. OK Mono C# TESTS 2 77 0
99540798 TRR A Nov. 25, 2020, 8:58 a.m. OK Mono C# TESTS 2 78 204800
99554555 cmt_23941 A Nov. 25, 2020, 11:45 a.m. OK MS C++ TESTS 2 15 0
99594217 Vermihunter A Nov. 25, 2020, 8:14 p.m. OK MS C++ TESTS 2 15 0
99550620 Keenan2114 A Nov. 25, 2020, 10:58 a.m. OK MS C++ TESTS 2 31 0
99571501 vjudge2 A Nov. 25, 2020, 2:56 p.m. OK MS C++ 2017 TESTS 2 0 0
99534204 vjudge5 A Nov. 25, 2020, 7:36 a.m. OK MS C++ 2017 TESTS 2 15 0
99521339 mystic_phoenix A Nov. 25, 2020, 4:22 a.m. OK MS C++ 2017 TESTS 2 15 0
99565850 Intercepter A Nov. 25, 2020, 1:54 p.m. OK MS C++ 2017 TESTS 2 15 0
99562120 0319 A Nov. 25, 2020, 1:09 p.m. OK MS C++ 2017 TESTS 2 15 0
99557966 cebrf A Nov. 25, 2020, 12:23 p.m. OK MS C++ 2017 TESTS 2 15 0
99556077 Greedy_coder_69 A Nov. 25, 2020, 12:02 p.m. OK MS C++ 2017 TESTS 2 15 0
99530401 james-tan A Nov. 25, 2020, 6:51 a.m. OK MS C++ 2017 TESTS 2 15 0
99521473 sy20190441030 A Nov. 25, 2020, 4:25 a.m. OK MS C++ 2017 TESTS 2 15 2355200
99593201 PrideBlack A Nov. 25, 2020, 7:52 p.m. OK MS C++ 2017 TESTS 2 30 0
99605743 nadilk A Nov. 26, 2020, 3:53 a.m. OK .NET Core C# TESTS 2 77 204800
99555911 obito312 A Nov. 25, 2020, 12:01 p.m. OK .NET Core C# TESTS 2 77 307200
99511285 Nidz A Nov. 24, 2020, 10:49 p.m. OK .NET Core C# TESTS 2 77 1536000
99605677 nadilk A Nov. 26, 2020, 3:51 a.m. OK .NET Core C# TESTS 2 108 0
99575453 asutosh1998 A Nov. 25, 2020, 3:31 p.m. OK .NET Core C# TESTS 2 108 204800
99608127 _iconer_ A Nov. 26, 2020, 5:02 a.m. OK .NET Core C# TESTS 2 109 204800
99561093 SlowDecay A Nov. 25, 2020, 12:56 p.m. OK Node.js TESTS 2 62 0
99543288 tajulislam A Nov. 25, 2020, 9:27 a.m. OK PHP TESTS 2 15 0
99516332 shakilpp148 A Nov. 25, 2020, 2:26 a.m. OK PHP TESTS 2 15 0
99550135 tajulislam A Nov. 25, 2020, 10:52 a.m. OK PHP TESTS 2 30 0
99605556 batyrbek.zhunis A Nov. 26, 2020, 3:48 a.m. OK PHP TESTS 2 31 0
99542010 tajulislam A Nov. 25, 2020, 9:12 a.m. OK PHP TESTS 2 77 0
99561579 guptakhushi345 A Nov. 25, 2020, 1:02 p.m. OK PyPy 2 TESTS 2 217 1536000
99513365 DedsecKnight A Nov. 25, 2020, 12:36 a.m. OK PyPy 3 TESTS 2 109 1331200
99510098 Bulbasaur A Nov. 24, 2020, 9:55 p.m. OK PyPy 3 TESTS 2 109 1331200
99512445 Abdelghani_ro A Nov. 24, 2020, 11:52 p.m. OK PyPy 3 TESTS 2 124 1331200
99592566 skoran.andrey A Nov. 25, 2020, 7:37 p.m. OK PyPy 3 TESTS 2 124 1331200
99586966 HonestCad A Nov. 25, 2020, 5:56 p.m. OK PyPy 3 TESTS 2 124 1331200
99546059 qrix A Nov. 25, 2020, 10:01 a.m. OK PyPy 3 TESTS 2 124 1331200
99509574 4th2D A Nov. 24, 2020, 9:34 p.m. OK PyPy 3 TESTS 2 124 1331200
99586390 SGrade A Nov. 25, 2020, 5:47 p.m. OK PyPy 3 TESTS 2 124 1433600
99543584 raunaqsingh07 A Nov. 25, 2020, 9:30 a.m. OK PyPy 3 TESTS 2 124 2048000
99543441 jeffeverett A Nov. 25, 2020, 9:29 a.m. OK PyPy 3 TESTS 2 139 1228800
99569937 hxu10 A Nov. 25, 2020, 2:42 p.m. OK Python 2 TESTS 2 155 0
99567413 Shubham33 A Nov. 25, 2020, 2:13 p.m. OK Python 3 TESTS 2 77 0
99533181 piyushprashar1605 A Nov. 25, 2020, 7:24 a.m. OK Python 3 TESTS 2 77 0
99529630 PseudoFluke A Nov. 25, 2020, 6:42 a.m. OK Python 3 TESTS 2 77 0
99516577 SansPapyrus683 A Nov. 25, 2020, 2:33 a.m. OK Python 3 TESTS 2 77 0
99510055 ae_cephei A Nov. 24, 2020, 9:53 p.m. OK Python 3 TESTS 2 77 307200
99545181 bug_eater A Nov. 25, 2020, 9:50 a.m. OK Python 3 TESTS 2 78 0
99520166 samarthprakash8 A Nov. 25, 2020, 3:58 a.m. OK Python 3 TESTS 2 78 0
99606027 kartik_077 A Nov. 26, 2020, 4:03 a.m. OK Python 3 TESTS 2 92 0
99581124 nattu179 A Nov. 25, 2020, 4:31 p.m. OK Python 3 TESTS 2 92 307200
99608154 prags29 A Nov. 26, 2020, 5:03 a.m. OK Python 3 TESTS 2 93 0
99595414 utkarsh2102 A Nov. 25, 2020, 8:46 p.m. OK Ruby TESTS 2 545 204800
99558841 manta1130 A Nov. 25, 2020, 12:32 p.m. OK Rust TESTS 2 15 0
99539818 Strorkis A Nov. 25, 2020, 8:47 a.m. OK Rust TESTS 2 15 0

remove filters

Back to search problems