Codeforces Round 715 (Div. 1)

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
1508 Codeforces Round 715 (Div. 1) FINISHED False 8100 113239499 April 16, 2021, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 4028 ) B Almost Sorted PROGRAMMING binary search bitmasks combinatorics constructive algorithms dp implementation math

B"Seiji Maki doesn't only like to observe relationships being unfolded, he also likes to observe sequences of numbers, especially permutations. Today, he has his eyes on almost sorted permutations. A permutation a_1, a_2, ... , a_n of 1, 2, ... , n is said to be almost sorted if the condition a_{i + 1} ge a_i - 1 holds for all i between 1 and n - 1 inclusive. Maki is considering the list of all almost sorted permutations of 1, 2, ... , n , given in lexicographical order, and he wants to find the k -th permutation in this list. Can you help him to find such permutation? Permutation p is lexicographically smaller than a permutation q if and only if the following holds: The first line contains a single integer t ( 1 <= t <= 1000 ) -- the number of test cases. Each test case consists of a single line containing two integers n and k ( 1 <= n <= 10^5 , 1 <= k <= 10^{18} ). It is guaranteed that the sum of n over all test cases does not exceed 10^5 . For each test case, print a single line containing the k -th almost sorted permutation of length n in lexicographical order, or -1 if it doesn't exist. For the first and second test, the list of almost sorted permutations with n = 1 is {[1] } . For the third and fifth test, the list of almost sorted permutations with n = 3 is {[1, 2, 3], [1, 3, 2], [2, 1, 3], [3, 2, 1] } . "...

Tutorials

Codeforces Round #715 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
113208829 Gassa B April 16, 2021, 3:02 p.m. OK D TESTS 12 61 6144000
113279723 rainboy B April 16, 2021, 11:03 p.m. OK GNU C11 TESTS 13 358 102400
113213060 Alice_foo_foo B April 16, 2021, 3:09 p.m. OK GNU C++11 TESTS 12 15 819200
113243023 clbclb B April 16, 2021, 4:13 p.m. OK GNU C++11 TESTS 12 15 1228800
113242002 sdlwsl B April 16, 2021, 4:10 p.m. OK GNU C++11 TESTS 12 15 2457600
113212336 czynt B April 16, 2021, 3:07 p.m. OK GNU C++11 TESTS 12 15 3993600
113237258 bnubeginner B April 16, 2021, 3:58 p.m. OK GNU C++11 TESTS 12 30 0
113230082 xyf007 B April 16, 2021, 3:41 p.m. OK GNU C++11 TESTS 12 30 1126400
113194714 nantf B April 16, 2021, 2:45 p.m. OK GNU C++11 TESTS 12 30 1228800
113217581 clfzs B April 16, 2021, 3:16 p.m. OK GNU C++11 TESTS 12 30 1228800
113228734 Mitsukasa_Ayase B April 16, 2021, 3:38 p.m. OK GNU C++11 TESTS 12 30 1740800
113285261 18Michael B April 17, 2021, 2:24 a.m. OK GNU C++11 TESTS 13 31 0
113240402 AlternatingCurrent B April 16, 2021, 4:06 p.m. OK GNU C++14 TESTS 12 30 0
113225488 GregFocker B April 16, 2021, 3:31 p.m. OK GNU C++14 TESTS 12 30 0
113245927 mramirez B April 16, 2021, 4:21 p.m. OK GNU C++14 TESTS 12 30 0
113243331 shdut0901 B April 16, 2021, 4:14 p.m. OK GNU C++14 TESTS 12 30 409600
113253347 fractal B April 16, 2021, 4:42 p.m. OK GNU C++14 TESTS 12 30 1126400
113236628 Fidisk B April 16, 2021, 3:57 p.m. OK GNU C++14 TESTS 12 30 1740800
113223519 PrashantM B April 16, 2021, 3:27 p.m. OK GNU C++14 TESTS 12 30 1843200
113279894 AhoCorasick B April 16, 2021, 11:09 p.m. OK GNU C++14 TESTS 13 30 3174400
113243769 marko312 B April 16, 2021, 4:15 p.m. OK GNU C++14 TESTS 12 31 0
113285483 Neal_lee B April 17, 2021, 2:29 a.m. OK GNU C++14 TESTS 13 31 0
113223172 cs142857 B April 16, 2021, 3:26 p.m. OK GNU C++17 TESTS 12 15 0
113218617 BigBag B April 16, 2021, 3:18 p.m. OK GNU C++17 TESTS 12 30 0
113243946 Zygis0321 B April 16, 2021, 4:15 p.m. OK GNU C++17 TESTS 12 30 0
113221480 Lieska B April 16, 2021, 3:23 p.m. OK GNU C++17 TESTS 12 30 204800
113241441 bry_rp B April 16, 2021, 4:09 p.m. OK GNU C++17 TESTS 12 30 204800
113226157 flashmt B April 16, 2021, 3:32 p.m. OK GNU C++17 TESTS 12 30 204800
113212443 zerotrac B April 16, 2021, 3:08 p.m. OK GNU C++17 TESTS 12 30 409600
113255328 PrideBlack B April 16, 2021, 4:47 p.m. OK GNU C++17 TESTS 12 30 409600
113220985 JaroslavUrban B April 16, 2021, 3:22 p.m. OK GNU C++17 TESTS 12 30 409600
113214922 wucstdio B April 16, 2021, 3:11 p.m. OK GNU C++17 TESTS 12 30 409600
113216154 Anachor B April 16, 2021, 3:13 p.m. OK GNU C++17 (64) TESTS 12 15 0
113215062 Swistakk B April 16, 2021, 3:12 p.m. OK GNU C++17 (64) TESTS 12 15 0
113240928 RedLeaf B April 16, 2021, 4:07 p.m. OK GNU C++17 (64) TESTS 12 15 409600
113204537 Sana B April 16, 2021, 2:57 p.m. OK GNU C++17 (64) TESTS 12 15 819200
113225315 cxr_o__o_cxr B April 16, 2021, 3:31 p.m. OK GNU C++17 (64) TESTS 12 15 819200
113201215 maroonrk B April 16, 2021, 2:52 p.m. OK GNU C++17 (64) TESTS 12 15 819200
113282152 starusc B April 17, 2021, 12:39 a.m. OK GNU C++17 (64) TESTS 13 15 819200
113248203 cjoa B April 16, 2021, 4:27 p.m. OK GNU C++17 (64) TESTS 12 15 1126400
113214027 KostasKostil B April 16, 2021, 3:10 p.m. OK GNU C++17 (64) TESTS 12 15 2150400
113209243 ALILILILILI-KHAN B April 16, 2021, 3:03 p.m. OK GNU C++17 (64) TESTS 12 15 2662400
113226083 Hasan0540 B April 16, 2021, 3:32 p.m. OK Go TESTS 12 31 819200
113294058 0x3F B April 17, 2021, 5:16 a.m. OK Go TESTS 13 46 0
113294290 0x3F B April 17, 2021, 5:20 a.m. OK Go TESTS 13 93 102400
113222874 uwi B April 16, 2021, 3:26 p.m. OK Java 11 TESTS 12 187 0
113246908 procrastinate7 B April 16, 2021, 4:24 p.m. OK Java 11 TESTS 12 202 0
113280878 asamanta B April 16, 2021, 11:47 p.m. OK Java 11 TESTS 13 217 0
113229354 Apfeloxid B April 16, 2021, 3:39 p.m. OK Java 11 TESTS 12 233 0
113238295 nick_301 B April 16, 2021, 4:01 p.m. OK Java 11 TESTS 12 1357 0
113228939 martins B April 16, 2021, 3:38 p.m. OK Java 8 TESTS 12 124 0
113210799 fetetriste B April 16, 2021, 3:05 p.m. OK Java 8 TESTS 12 124 0
113217743 dalt B April 16, 2021, 3:16 p.m. OK Java 8 TESTS 12 124 0
113222467 iakovlev.zakhar B April 16, 2021, 3:25 p.m. OK Java 8 TESTS 12 124 0
113241850 TheSawan B April 16, 2021, 4:10 p.m. OK Java 8 TESTS 12 124 0
113237592 Agnimandur B April 16, 2021, 3:59 p.m. OK Java 8 TESTS 12 124 0
113267335 YahiaSherif B April 16, 2021, 6:48 p.m. OK Java 8 TESTS 13 124 5529600
113237924 golions B April 16, 2021, 4 p.m. OK Java 8 TESTS 12 139 0
113229175 rabaiBomkarBittalBang B April 16, 2021, 3:39 p.m. OK Java 8 TESTS 12 140 0
113235849 pulkit1411 B April 16, 2021, 3:55 p.m. OK Java 8 TESTS 12 140 15769600
113209487 Tlatoani B April 16, 2021, 3:03 p.m. OK Kotlin TESTS 12 124 0
113222186 arvindf232 B April 16, 2021, 3:24 p.m. OK Kotlin TESTS 12 140 1331200
113238970 koper B April 16, 2021, 4:02 p.m. OK Kotlin TESTS 12 202 0
113247711 tarattata1 B April 16, 2021, 4:26 p.m. OK MS C++ 2017 TESTS 12 62 2048000
113261607 yvandoor B April 16, 2021, 5:41 p.m. OK MS C++ 2017 TESTS 13 93 307200
113255160 yvandoor B April 16, 2021, 4:46 p.m. OK MS C++ 2017 TESTS 12 93 307200
113244310 GeKa B April 16, 2021, 4:16 p.m. OK MS C++ 2017 TESTS 12 93 2048000
113226379 uttfuczmuo B April 16, 2021, 3:33 p.m. OK MS C++ 2017 TESTS 12 93 3686400
113291937 riantkb B April 17, 2021, 4:41 a.m. OK .NET Core C# TESTS 13 93 4710400
113274154 Arnyev B April 16, 2021, 8:35 p.m. OK .NET Core C# TESTS 13 93 5734400
113224947 Yupiteru B April 16, 2021, 3:30 p.m. OK .NET Core C# TESTS 12 93 6144000
113241779 Arnyev B April 16, 2021, 4:10 p.m. OK .NET Core C# TESTS 12 108 5734400
113205247 dolphinigle B April 16, 2021, 2:58 p.m. OK PyPy 2 TESTS 12 202 29593600
113255081 FlakeLCR B April 16, 2021, 4:46 p.m. OK PyPy 3 TESTS 12 139 10240000
113204640 kclee2172 B April 16, 2021, 2:57 p.m. OK PyPy 3 TESTS 12 139 13312000
113240046 hir35 B April 16, 2021, 4:05 p.m. OK PyPy 3 TESTS 12 171 9216000
113222357 cocopalm B April 16, 2021, 3:25 p.m. OK PyPy 3 TESTS 12 171 9728000
113227471 VTifand B April 16, 2021, 3:35 p.m. OK PyPy 3 TESTS 12 171 11776000
113204369 conqueror_of_tourist B April 16, 2021, 2:56 p.m. OK PyPy 3 TESTS 12 171 13107200
113292594 not_tehlka B April 17, 2021, 4:52 a.m. OK PyPy 3 TESTS 13 186 8499200
113214613 asdsasd B April 16, 2021, 3:11 p.m. OK PyPy 3 TESTS 12 186 8499200
113233007 tamato B April 16, 2021, 3:48 p.m. OK PyPy 3 TESTS 12 187 8704000
113241140 tehlka B April 16, 2021, 4:08 p.m. OK PyPy 3 TESTS 12 202 8396800
113218575 nwi B April 16, 2021, 3:18 p.m. OK Python 2 TESTS 12 93 6860800
113259808 324857679 B April 16, 2021, 5:25 p.m. OK Python 3 TESTS 13 124 8089600
113259773 324857679 B April 16, 2021, 5:25 p.m. OK Python 3 TESTS 13 155 6963200
113240600 cottoncotton B April 16, 2021, 4:07 p.m. OK Rust TESTS 12 31 716800
113211315 sansen B April 16, 2021, 3:06 p.m. OK Rust TESTS 12 31 1536000
113238821 toomer B April 16, 2021, 4:02 p.m. OK Rust TESTS 12 46 1024000
113224452 orz_liuwei B April 16, 2021, 3:29 p.m. OK Rust TESTS 12 46 3993600
113229360 shino16 B April 16, 2021, 3:39 p.m. OK Rust TESTS 12 156 409600

remove filters

Back to search problems