Codeforces Round 779 (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
1658 Codeforces Round 779 (Div. 2) FINISHED False 7200 83431499 March 27, 2022, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 18656 ) B Marin and Anti-coprime Permutation PROGRAMMING combinatorics math

B'Marin wants you to count number of permutations that are beautiful. A beautiful permutation of length n is a permutation that has the following property: gcd (1 cdot p_1, , 2 cdot p_2, , ... , , n cdot p_n) > 1, where gcd is the greatest common divisor. A permutation 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). The first line contains one integer t ( 1 <= t <= 10^3 ) -- the number of test cases. Each test case consists of one line containing one integer n ( 1 <= n <= 10^3 ). For each test case, print one integer -- number of beautiful permutations. Because the answer can be very big, please print the answer modulo 998 ,244 ,353 . In first test case, we only have one permutation which is [1] but it is not beautiful because gcd(1 cdot 1) = 1 . In second test case, we only have one beautiful permutation which is [2, 1] because gcd(1 cdot 2, 2 cdot 1) = 2 . '...

Tutorials

Codeforces Round #779 (Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
151163034 1435730 B March 27, 2022, 4:28 p.m. OK GNU C11 TESTS 4 15 0
151163364 loki_7 B March 27, 2022, 4:29 p.m. OK GNU C11 TESTS 4 15 0
151159528 Legendaryhero B March 27, 2022, 4:20 p.m. OK GNU C11 TESTS 4 15 0
151159602 Anikaroy B March 27, 2022, 4:21 p.m. OK GNU C11 TESTS 4 15 0
151161830 ZhelannikovAndrey B March 27, 2022, 4:26 p.m. OK GNU C11 TESTS 4 15 0
151194373 CYHei_iu B March 28, 2022, 1:16 a.m. OK GNU C11 TESTS 4 31 0
151158794 bezlant B March 27, 2022, 4:19 p.m. OK GNU C11 TESTS 4 31 0
151197151 theSavyasachi B March 28, 2022, 2:36 a.m. OK GNU C++14 TESTS 4 0 0
151205834 rishyash8 B March 28, 2022, 5:33 a.m. OK GNU C++14 TESTS 4 0 0
151204708 zht_codeforces B March 28, 2022, 5:14 a.m. OK GNU C++14 TESTS 4 0 0
151203303 hardy_9795 B March 28, 2022, 4:50 a.m. OK GNU C++14 TESTS 4 0 0
151202896 AkaiLemon B March 28, 2022, 4:42 a.m. OK GNU C++14 TESTS 4 0 0
151199670 The_Mad1 B March 28, 2022, 3:37 a.m. OK GNU C++14 TESTS 4 0 0
151199204 maddocho B March 28, 2022, 3:26 a.m. OK GNU C++14 TESTS 4 0 0
151198036 xtustc B March 28, 2022, 2:58 a.m. OK GNU C++14 TESTS 4 0 0
151207176 ankitcareers7 B March 28, 2022, 5:54 a.m. OK GNU C++14 TESTS 4 0 0
151206304 kanikahmh B March 28, 2022, 5:40 a.m. OK GNU C++14 TESTS 4 0 0
151207070 helpinghandhh11 B March 28, 2022, 5:52 a.m. OK GNU C++17 TESTS 4 0 0
151206997 ddshotaman B March 28, 2022, 5:51 a.m. OK GNU C++17 TESTS 4 0 0
151206136 ashish.rrs B March 28, 2022, 5:38 a.m. OK GNU C++17 TESTS 4 0 0
151205635 uewbv B March 28, 2022, 5:30 a.m. OK GNU C++17 TESTS 4 0 0
151205006 Yuvraj176 B March 28, 2022, 5:19 a.m. OK GNU C++17 TESTS 4 0 0
151204871 darkandy B March 28, 2022, 5:17 a.m. OK GNU C++17 TESTS 4 0 0
151207428 sanjayprajapati B March 28, 2022, 5:58 a.m. OK GNU C++17 TESTS 4 0 0
151207624 hemant_thakur B March 28, 2022, 6:01 a.m. OK GNU C++17 TESTS 4 0 0
151207374 CF_HERO_17 B March 28, 2022, 5:57 a.m. OK GNU C++17 TESTS 4 0 0
151207172 mahir_314 B March 28, 2022, 5:54 a.m. OK GNU C++17 TESTS 4 0 0
151185680 Rania B March 27, 2022, 8:47 p.m. OK GNU C++17 (64) TESTS 4 0 0
151202205 InariInDream B March 28, 2022, 4:29 a.m. OK GNU C++17 (64) TESTS 4 0 0
151196297 YXx315 B March 28, 2022, 2:14 a.m. OK GNU C++17 (64) TESTS 4 0 0
151195470 Steins__Gate B March 28, 2022, 1:50 a.m. OK GNU C++17 (64) TESTS 4 0 0
151194050 fushan B March 28, 2022, 1:06 a.m. OK GNU C++17 (64) TESTS 4 0 0
151192735 Mr-Robot_545 B March 28, 2022, 12:24 a.m. OK GNU C++17 (64) TESTS 4 0 0
151192704 Mr-Robot_545 B March 28, 2022, 12:24 a.m. OK GNU C++17 (64) TESTS 4 0 0
151192383 kodomotachi B March 28, 2022, 12:12 a.m. OK GNU C++17 (64) TESTS 4 0 0
151192261 grittyb B March 28, 2022, 12:08 a.m. OK GNU C++17 (64) TESTS 4 0 0
151185523 sannin.uchiha B March 27, 2022, 8:43 p.m. OK GNU C++17 (64) TESTS 4 0 0
151204347 shiva_cp B March 28, 2022, 5:09 a.m. OK GNU C++20 (64) TESTS 4 0 0
151203821 coder_Gajendra B March 28, 2022, 4:59 a.m. OK GNU C++20 (64) TESTS 4 0 0
151203068 Mr_SpacePirate B March 28, 2022, 4:45 a.m. OK GNU C++20 (64) TESTS 4 0 0
151202938 b14ck_5m0k3 B March 28, 2022, 4:43 a.m. OK GNU C++20 (64) TESTS 4 0 0
151202256 JustJie B March 28, 2022, 4:30 a.m. OK GNU C++20 (64) TESTS 4 0 0
151201838 abhinay_76 B March 28, 2022, 4:23 a.m. OK GNU C++20 (64) TESTS 4 0 0
151204563 rxhxn_30 B March 28, 2022, 5:12 a.m. OK GNU C++20 (64) TESTS 4 0 0
151204599 baby._.shadow B March 28, 2022, 5:12 a.m. OK GNU C++20 (64) TESTS 4 0 0
151205586 me_poojan23 B March 28, 2022, 5:29 a.m. OK GNU C++20 (64) TESTS 4 0 0
151206107 neha_001 B March 28, 2022, 5:37 a.m. OK GNU C++20 (64) TESTS 4 0 0
151168228 koqo B March 27, 2022, 5:01 p.m. OK Go TESTS 4 15 0
151201779 quanjun B March 28, 2022, 4:22 a.m. OK Go TESTS 4 31 0
151175021 vijender_8601 B March 27, 2022, 6:03 p.m. OK Java 11 TESTS 4 140 0
151188241 Relief B March 27, 2022, 9:49 p.m. OK Java 11 TESTS 4 155 0
151190974 Himansh0180 B March 27, 2022, 11:21 p.m. OK Java 11 TESTS 4 171 0
151203104 mayank.singh19 B March 28, 2022, 4:46 a.m. OK Java 11 TESTS 4 171 0
151201181 Satyaa B March 28, 2022, 4:10 a.m. OK Java 11 TESTS 4 171 0
151198743 akashkumarkly B March 28, 2022, 3:16 a.m. OK Java 11 TESTS 4 171 0
151195149 aditya2024 B March 28, 2022, 1:40 a.m. OK Java 11 TESTS 4 171 0
151177942 rerererere B March 27, 2022, 6:39 p.m. OK Java 11 TESTS 4 171 0
151177862 _ryan18_ B March 27, 2022, 6:37 p.m. OK Java 11 TESTS 4 171 0
151169731 SaberXpro B March 27, 2022, 5:10 p.m. OK Java 11 TESTS 4 171 0
151174917 sky9313 B March 27, 2022, 6:02 p.m. OK Java 8 TESTS 4 92 0
151192570 ssingh0271 B March 28, 2022, 12:19 a.m. OK Java 8 TESTS 4 93 0
151174170 FirePegasus B March 27, 2022, 5:54 p.m. OK Java 8 TESTS 4 108 0
151196318 ShivamMehta B March 28, 2022, 2:15 a.m. OK Java 8 TESTS 4 108 5734400
151206020 mayank61 B March 28, 2022, 5:36 a.m. OK Java 8 TESTS 4 109 0
151169666 gssakash B March 27, 2022, 5:10 p.m. OK Java 8 TESTS 4 109 0
151170536 BhargavModha B March 27, 2022, 5:17 p.m. OK Java 8 TESTS 4 109 0
151173401 RR2000 B March 27, 2022, 5:44 p.m. OK Java 8 TESTS 4 109 0
151206867 shivam01_0 B March 28, 2022, 5:49 a.m. OK Java 8 TESTS 4 124 0
151180726 rajneesh.osho B March 27, 2022, 7:17 p.m. OK Java 8 TESTS 4 124 38297600
151173597 qsqnk B March 27, 2022, 5:46 p.m. OK Kotlin 1.4 TESTS 4 124 0
151173633 ZW22 B March 27, 2022, 5:47 p.m. OK MS C++ 2017 TESTS 4 0 0
151195710 LuckyInaba14 B March 28, 2022, 1:57 a.m. OK MS C++ 2017 TESTS 4 15 0
151164027 TAKELAMA B March 27, 2022, 4:30 p.m. OK MS C++ 2017 TESTS 4 15 0
151164290 YouseffSalama B March 27, 2022, 4:31 p.m. OK MS C++ 2017 TESTS 4 15 0
151202197 Akash_singhal B March 28, 2022, 4:29 a.m. OK MS C++ 2017 TESTS 4 15 0
151200884 _Rimjhim_36 B March 28, 2022, 4:03 a.m. OK MS C++ 2017 TESTS 4 15 0
151196304 19acm B March 28, 2022, 2:14 a.m. OK MS C++ 2017 TESTS 4 15 0
151185490 code-n-roll B March 27, 2022, 8:42 p.m. OK MS C++ 2017 TESTS 4 15 0
151199124 Sashjf B March 28, 2022, 3:24 a.m. OK MS C++ 2017 TESTS 4 31 0
151168987 karim.elsa3d100 B March 27, 2022, 5:05 p.m. OK MS C++ 2017 TESTS 4 31 0
151195568 Olasiliksizci B March 28, 2022, 1:53 a.m. OK .NET Core C# TESTS 4 77 0
151178489 suraj B March 27, 2022, 6:46 p.m. OK .NET Core C# TESTS 4 77 0
151168654 Repsaj21o B March 27, 2022, 5:03 p.m. OK .NET Core C# TESTS 4 78 0
151171624 1_2_3_4_5_9 B March 27, 2022, 5:26 p.m. OK PyPy 2 TESTS 4 108 921600
151182450 legend.ary_as B March 27, 2022, 7:45 p.m. OK PyPy 3 TESTS 4 108 2150400
151168652 sigilius B March 27, 2022, 5:03 p.m. OK PyPy 3 TESTS 4 124 3379200
151178752 ON_THE_EDGE B March 27, 2022, 6:50 p.m. OK PyPy 3 TESTS 4 140 2969600
151195563 Maksadbek B March 28, 2022, 1:53 a.m. OK PyPy 3 TESTS 4 155 4198400
151169930 xqc0w B March 27, 2022, 5:12 p.m. OK PyPy 3 TESTS 4 202 5427200
151195444 rutz12 B March 28, 2022, 1:50 a.m. OK PyPy 3 TESTS 4 218 6963200
151196319 Israr_Ahmed B March 28, 2022, 2:15 a.m. OK PyPy 3 TESTS 4 218 7372800
151161796 Akash2227 B March 27, 2022, 4:26 p.m. OK PyPy 3 TESTS 4 233 6656000
151172104 abhijeet.panihar.cse20 B March 27, 2022, 5:31 p.m. OK PyPy 3 TESTS 4 233 9728000
151171592 pranay_28 B March 27, 2022, 5:26 p.m. OK PyPy 3 TESTS 4 248 7168000
151176592 nitish420 B March 27, 2022, 6:21 p.m. OK PyPy 3-64 TESTS 4 77 2252800
151172199 rivnam B March 27, 2022, 5:32 p.m. OK PyPy 3-64 TESTS 4 77 2252800
151193308 majay1638 B March 28, 2022, 12:43 a.m. OK PyPy 3-64 TESTS 4 77 4096000
151187599 beethoven97 B March 27, 2022, 9:32 p.m. OK PyPy 3-64 TESTS 4 77 4608000
151203468 sakshatmali B March 28, 2022, 4:53 a.m. OK PyPy 3-64 TESTS 4 93 2662400
151183826 stand_by B March 27, 2022, 8:11 p.m. OK PyPy 3-64 TESTS 4 93 3481600
151206917 abhishek7997 B March 28, 2022, 5:50 a.m. OK PyPy 3-64 TESTS 4 108 4710400
151174042 krishna369 B March 27, 2022, 5:52 p.m. OK PyPy 3-64 TESTS 4 108 7168000
151169599 xjzsq_ B March 27, 2022, 5:09 p.m. OK PyPy 3-64 TESTS 4 108 7168000
151207093 pycoder123 B March 28, 2022, 5:53 a.m. OK PyPy 3-64 TESTS 4 109 4505600
151159854 We11Done B March 27, 2022, 4:21 p.m. OK Python 2 TESTS 4 311 102400
151183370 fredy10 B March 27, 2022, 8:02 p.m. OK Python 3 TESTS 4 46 0
151173578 shashankbarole410 B March 27, 2022, 5:46 p.m. OK Python 3 TESTS 4 46 0
151176138 Danny19 B March 27, 2022, 6:16 p.m. OK Python 3 TESTS 4 61 307200
151170850 Sagar581 B March 27, 2022, 5:19 p.m. OK Python 3 TESTS 4 78 0
151183123 eugalt B March 27, 2022, 7:58 p.m. OK Python 3 TESTS 4 78 0
151174813 SangeetaSingh B March 27, 2022, 6:01 p.m. OK Python 3 TESTS 4 78 0
151172379 deepanker B March 27, 2022, 5:33 p.m. OK Python 3 TESTS 4 93 716800
151183214 eugalt B March 27, 2022, 8 p.m. OK Python 3 TESTS 4 108 0
151197396 harshk_52 B March 28, 2022, 2:42 a.m. OK Python 3 TESTS 4 124 0
151202486 Srirambabu B March 28, 2022, 4:35 a.m. OK Python 3 TESTS 4 124 0
151206073 Spheniscine B March 28, 2022, 5:36 a.m. OK Rust 2021 TESTS 4 0 102400
151199304 HCISY B March 28, 2022, 3:29 a.m. OK Rust 2021 TESTS 4 15 0

remove filters

Back to search problems