Codeforces Round 869 (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
1818 Codeforces Round 869 (Div. 2) FINISHED False 8100 49044299 April 29, 2023, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 15123 ) B Indivisible PROGRAMMING constructive algorithms

B"You're given a positive integer n . Find a permutation a_1, a_2, ... , a_n such that for any 1 <= q l < r <= q n , the sum a_l + a_{l+1} + ... + a_r is not divisible by r-l+1 . 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, 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). Each test contains multiple test cases. The first line contains the number of test cases t ( 1 <= t <= 100 ). Description of the test cases follows. The first line of each test case contain a single integer n ( 1 <= q n <= q 100 ) -- the size of the desired permutation. For each test case, if there is no such permutation print -1 . Otherwise, print n distinct integers p_1, p_{2}, ... , p_n ( 1 <= q p_i <= q n ) -- a permutation satisfying the condition described in the statement. If there are multiple solutions, print any. In the first example, there are no valid pairs of l < r , meaning that the condition is true for all such pairs. In the second example, the only valid pair is l=1 and r=2 , for which a_1 + a_2 = 1+2=3 is not divisible by r-l+1=2 . in the third example, for l=1 and r=3 the sum a_1+a_2+a_3 is always 6 , which is divisible by 3 . "...

Tutorials

Codeforces Round #869 (Div.1, Div.2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
203991680 smartepicure B April 30, 2023, 1:37 a.m. OK Clang++20 Diagnostics TESTS 7 46 0
203949560 vikaschoudharycs097 B April 29, 2023, 4:19 p.m. OK GNU C11 TESTS 7 31 0
204003844 lream2 B April 30, 2023, 5:51 a.m. OK GNU C11 TESTS 7 31 0
203955127 LukeKang B April 29, 2023, 4:39 p.m. OK GNU C11 TESTS 7 46 0
203962175 iffatul_anon B April 29, 2023, 5:33 p.m. OK GNU C11 TESTS 7 46 0
203967543 Darshan_7 B April 29, 2023, 6:20 p.m. OK GNU C11 TESTS 7 46 0
204003127 Alchepirate B April 30, 2023, 5:40 a.m. OK GNU C11 TESTS 7 46 0
203944784 mahmudrashik B April 29, 2023, 4:02 p.m. OK GNU C11 TESTS 7 46 0
203945636 Smallorange B April 29, 2023, 4:05 p.m. OK GNU C11 TESTS 7 46 0
203950226 hnust_yuyi B April 29, 2023, 4:22 p.m. OK GNU C11 TESTS 7 46 0
203952936 hnust_lujunye B April 29, 2023, 4:32 p.m. OK GNU C11 TESTS 7 46 0
203998992 jack_r_007 B April 30, 2023, 4:30 a.m. OK GNU C++14 TESTS 7 0 0
203998377 Abhishek__2021 B April 30, 2023, 4:15 a.m. OK GNU C++14 TESTS 7 0 0
204004046 LinkZelda B April 30, 2023, 5:54 a.m. OK GNU C++14 TESTS 7 0 0
204002502 nakka B April 30, 2023, 5:31 a.m. OK GNU C++14 TESTS 7 0 0
204002409 pratik1603 B April 30, 2023, 5:29 a.m. OK GNU C++14 TESTS 7 0 0
204001756 saurabh_16 B April 30, 2023, 5:18 a.m. OK GNU C++14 TESTS 7 0 0
204001249 lnahg_1 B April 30, 2023, 5:08 a.m. OK GNU C++14 TESTS 7 0 0
204000623 zzk2010 B April 30, 2023, 4:55 a.m. OK GNU C++14 TESTS 7 0 0
204000370 Nahida__ B April 30, 2023, 4:50 a.m. OK GNU C++14 TESTS 7 0 0
203999090 MeFter B April 30, 2023, 4:32 a.m. OK GNU C++14 TESTS 7 0 0
204003493 AbdulrhmanHosny B April 30, 2023, 5:46 a.m. OK GNU C++17 TESTS 7 0 0
204003526 nice_doggos B April 30, 2023, 5:46 a.m. OK GNU C++17 TESTS 7 0 0
204003363 naman-0316 B April 30, 2023, 5:44 a.m. OK GNU C++17 TESTS 7 0 0
204003024 its_Lokesh B April 30, 2023, 5:38 a.m. OK GNU C++17 TESTS 7 0 0
204003000 Zaman_R B April 30, 2023, 5:38 a.m. OK GNU C++17 TESTS 7 0 0
204001454 hom1e B April 30, 2023, 5:12 a.m. OK GNU C++17 TESTS 7 0 0
204001339 White_Zombie B April 30, 2023, 5:10 a.m. OK GNU C++17 TESTS 7 0 0
204001286 Jatin147 B April 30, 2023, 5:09 a.m. OK GNU C++17 TESTS 7 0 0
203998410 rayhan_ B April 30, 2023, 4:16 a.m. OK GNU C++17 TESTS 7 0 0
203997966 Hamroz_JONN B April 30, 2023, 4:03 a.m. OK GNU C++17 TESTS 7 0 0
203999755 hnust_zhaoqiankun B April 30, 2023, 4:37 a.m. OK GNU C++17 (64) TESTS 7 0 0
204004111 pranjalcsk123 B April 30, 2023, 5:55 a.m. OK GNU C++17 (64) TESTS 7 0 0
204000592 shuvocoder2025 B April 30, 2023, 4:55 a.m. OK GNU C++17 (64) TESTS 7 0 0
203998859 Followall B April 30, 2023, 4:27 a.m. OK GNU C++17 (64) TESTS 7 0 0
203998169 israil445 B April 30, 2023, 4:09 a.m. OK GNU C++17 (64) TESTS 7 0 0
203997365 suigiegie_fanboy B April 30, 2023, 3:48 a.m. OK GNU C++17 (64) TESTS 7 0 0
203996139 qworasdzxcl2 B April 30, 2023, 3:23 a.m. OK GNU C++17 (64) TESTS 7 0 0
203993881 vaibhav0460 B April 30, 2023, 2:31 a.m. OK GNU C++17 (64) TESTS 7 0 0
203992164 lcpt B April 30, 2023, 1:49 a.m. OK GNU C++17 (64) TESTS 7 0 0
203991011 luckmaster B April 30, 2023, 1:20 a.m. OK GNU C++17 (64) TESTS 7 0 0
204002517 Ansh007 B April 30, 2023, 5:31 a.m. OK GNU C++20 (64) TESTS 7 0 0
204002543 ANON7MOUS B April 30, 2023, 5:31 a.m. OK GNU C++20 (64) TESTS 7 0 0
204002894 sunsaGetReady B April 30, 2023, 5:37 a.m. OK GNU C++20 (64) TESTS 7 0 0
204003201 zero.xzp B April 30, 2023, 5:41 a.m. OK GNU C++20 (64) TESTS 7 0 0
204003353 sakuracopic B April 30, 2023, 5:44 a.m. OK GNU C++20 (64) TESTS 7 0 0
204003617 Ahmed--Mohsen B April 30, 2023, 5:48 a.m. OK GNU C++20 (64) TESTS 7 0 0
204004079 asaecs2 B April 30, 2023, 5:54 a.m. OK GNU C++20 (64) TESTS 7 0 0
204004316 1016huobao B April 30, 2023, 5:58 a.m. OK GNU C++20 (64) TESTS 7 0 0
204004368 Rose114514 B April 30, 2023, 5:59 a.m. OK GNU C++20 (64) TESTS 7 0 0
204004410 Vignat0905 B April 30, 2023, 5:59 a.m. OK GNU C++20 (64) TESTS 7 0 0
203943318 Snehalatha2002 B April 29, 2023, 3:57 p.m. OK Go TESTS 7 30 0
203941941 Harish_777 B April 29, 2023, 3:52 p.m. OK Go TESTS 7 31 204800
203983144 rated21 B April 29, 2023, 10 p.m. OK Java 11 TESTS 7 155 0
204002551 TheForest B April 30, 2023, 5:31 a.m. OK Java 11 TESTS 7 171 0
203964135 vijender_8601 B April 29, 2023, 5:48 p.m. OK Java 11 TESTS 7 187 0
203942795 neelakshsharma1997 B April 29, 2023, 3:55 p.m. OK Java 11 TESTS 7 187 0
203950288 30516_sneha B April 29, 2023, 4:22 p.m. OK Java 11 TESTS 7 202 0
203945632 Zoatel B April 29, 2023, 4:05 p.m. OK Java 11 TESTS 7 202 0
203948436 deepakanto B April 29, 2023, 4:15 p.m. OK Java 11 TESTS 7 202 7168000
203988487 hacker4723rd B April 30, 2023, 12:14 a.m. OK Java 11 TESTS 7 217 0
203944012 js2585 B April 29, 2023, 3:59 p.m. OK Java 11 TESTS 7 217 0
203941938 Daly105 B April 29, 2023, 3:52 p.m. OK Java 11 TESTS 7 217 0
203995239 Suraj1607 B April 30, 2023, 3:04 a.m. OK Java 17 TESTS 7 155 512000
203949891 m0rka1 B April 29, 2023, 4:21 p.m. OK Java 17 TESTS 7 187 204800
203946623 kingsharma1718 B April 29, 2023, 4:09 p.m. OK Java 17 TESTS 7 187 5939200
203963903 aishwarykesarwani B April 29, 2023, 5:47 p.m. OK Java 17 TESTS 7 202 0
203960748 Extradict B April 29, 2023, 5:25 p.m. OK Java 17 TESTS 7 202 0
203963487 vikash_45 B April 29, 2023, 5:43 p.m. OK Java 17 TESTS 7 202 102400
203948749 akshatkrsing B April 29, 2023, 4:16 p.m. OK Java 17 TESTS 7 202 204800
204003268 wintersoldier2004 B April 30, 2023, 5:42 a.m. OK Java 17 TESTS 7 202 409600
203988352 rmakash999 B April 30, 2023, 12:10 a.m. OK Java 17 TESTS 7 202 716800
203947479 mohitkumarmahto576 B April 29, 2023, 4:12 p.m. OK Java 17 TESTS 7 218 0
203997968 QUITTING B April 30, 2023, 4:03 a.m. OK Java 8 TESTS 7 93 0
203993974 IanISam B April 30, 2023, 2:33 a.m. OK Java 8 TESTS 7 93 0
203988861 NerfThis B April 30, 2023, 12:24 a.m. OK Java 8 TESTS 7 93 0
203949394 uju B April 29, 2023, 4:19 p.m. OK Java 8 TESTS 7 108 0
203976348 ahmedTarek28 B April 29, 2023, 7:59 p.m. OK Java 8 TESTS 7 108 0
203944720 bloodsid B April 29, 2023, 4:01 p.m. OK Java 8 TESTS 7 108 0
203984033 mohamedhassan_c B April 29, 2023, 10:19 p.m. OK Java 8 TESTS 7 109 5734400
203963986 Deependra_coder B April 29, 2023, 5:47 p.m. OK Java 8 TESTS 7 124 0
203964553 Inferior_Geek B April 29, 2023, 5:52 p.m. OK Java 8 TESTS 7 139 0
203964972 formidablechief_27 B April 29, 2023, 5:56 p.m. OK Java 8 TESTS 7 140 38604800
203962091 Iseeuinmyd B April 29, 2023, 5:33 p.m. OK MS C++ 2017 TESTS 7 15 0
203949528 nirbhaysora B April 29, 2023, 4:19 p.m. OK MS C++ 2017 TESTS 7 15 0
203944279 Abdullah5111 B April 29, 2023, 4 p.m. OK MS C++ 2017 TESTS 7 30 0
203992036 wly666... B April 30, 2023, 1:45 a.m. OK MS C++ 2017 TESTS 7 31 0
203956722 EbuYandex B April 29, 2023, 4:45 p.m. OK MS C++ 2017 TESTS 7 31 0
203965884 SlavaD B April 29, 2023, 6:04 p.m. OK Perl TESTS 7 15 0
203963175 Wassim221e B April 29, 2023, 5:41 p.m. OK PHP TESTS 7 46 0
203971874 alpy123 B April 29, 2023, 7:02 p.m. OK PyPy 3 TESTS 7 93 2560000
203961104 VidGa B April 29, 2023, 5:27 p.m. OK PyPy 3 TESTS 7 108 2048000
203993701 w313880557 B April 30, 2023, 2:27 a.m. OK PyPy 3 TESTS 7 108 2150400
203943967 abbccd B April 29, 2023, 3:59 p.m. OK PyPy 3 TESTS 7 108 2764800
203944430 YuraK B April 29, 2023, 4:01 p.m. OK PyPy 3 TESTS 7 108 3174400
203968807 NeiderG B April 29, 2023, 6:32 p.m. OK PyPy 3 TESTS 7 109 3379200
203967488 Andy_Huo B April 29, 2023, 6:19 p.m. OK PyPy 3 TESTS 7 109 3686400
203941876 Mahdieh_Naderi B April 29, 2023, 3:52 p.m. OK PyPy 3 TESTS 7 124 2048000
203971506 oneku16 B April 29, 2023, 6:58 p.m. OK PyPy 3-64 TESTS 7 46 2560000
203943140 DrMrogon B April 29, 2023, 3:56 p.m. OK PyPy 3-64 TESTS 7 46 2764800
203941804 bogmit B April 29, 2023, 3:52 p.m. OK PyPy 3-64 TESTS 7 61 1638400
203971396 oneku16 B April 29, 2023, 6:57 p.m. OK PyPy 3-64 TESTS 7 61 2560000
203964486 abhipandey9315 B April 29, 2023, 5:51 p.m. OK PyPy 3-64 TESTS 7 61 3276800
203980969 AyuAnchor B April 29, 2023, 9:13 p.m. OK PyPy 3-64 TESTS 7 61 3584000
203950178 sonfon B April 29, 2023, 4:22 p.m. OK PyPy 3-64 TESTS 7 62 0
203998163 aspiringquant B April 30, 2023, 4:08 a.m. OK PyPy 3-64 TESTS 7 62 1740800
203953757 jhilary B April 29, 2023, 4:35 p.m. OK PyPy 3-64 TESTS 7 62 1843200
203968468 Div2003 B April 29, 2023, 6:29 p.m. OK PyPy 3-64 TESTS 7 62 3276800
203966207 farhad-nstu B April 29, 2023, 6:07 p.m. OK Python 3 TESTS 7 31 0
203966063 Riyajulhasan B April 29, 2023, 6:06 p.m. OK Python 3 TESTS 7 31 0
203952496 HAL_9000 B April 29, 2023, 4:30 p.m. OK Python 3 TESTS 7 31 0
204002572 coderbodrul B April 30, 2023, 5:32 a.m. OK Python 3 TESTS 7 46 0
203994702 brightest66 B April 30, 2023, 2:51 a.m. OK Python 3 TESTS 7 46 0
203975111 gustavoo B April 29, 2023, 7:42 p.m. OK Python 3 TESTS 7 46 0
203968488 shashwat22473 B April 29, 2023, 6:29 p.m. OK Python 3 TESTS 7 46 0
203966389 farhad-nstu B April 29, 2023, 6:09 p.m. OK Python 3 TESTS 7 46 0
203965005 _lolbbooka_ B April 29, 2023, 5:56 p.m. OK Python 3 TESTS 7 46 0
203962186 OzodbekX B April 29, 2023, 5:33 p.m. OK Python 3 TESTS 7 46 0
203941907 RavellaSrilatha B April 29, 2023, 3:52 p.m. OK Ruby 3 TESTS 7 327 409600
203990459 AlexanderL B April 30, 2023, 1:06 a.m. OK Rust 2021 TESTS 7 0 0
203955853 xphosAdria B April 29, 2023, 4:42 p.m. OK Rust 2021 TESTS 7 0 0

remove filters

Back to search problems