Educational Codeforces Round 79 (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
1279 Educational Codeforces Round 79 (Rated for Div. 2) FINISHED False 7200 159981587 Dec. 27, 2019, 2:40 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 389 ) E New Year Permutations PROGRAMMING combinatorics dp 2700

B"Yeah, we failed to make up a New Year legend for this problem. A permutation of length n is an array of n integers such that every integer from 1 to n appears in it exactly once. An element y of permutation p is reachable from element x if x = y , or p_x = y , or p_{p_x} = y , and so on. The decomposition of a permutation p is defined as follows: firstly, we have a permutation p , all elements of which are not marked, and an empty list l . Then we do the following: while there is at least one not marked element in p , we find the leftmost such element, list all elements that are reachable from it in the order they appear in p , mark all of these elements, then cyclically shift the list of those elements so that the maximum appears at the first position, and add this list as an element of l . After all elements are marked, l is the result of this decomposition. For example, if we want to build a decomposition of p = [5, 4, 2, 3, 1, 7, 8, 6] , we do the following: The New Year transformation of a permutation is defined as follows: we build the decomposition of this permutation; then we sort all lists in decomposition in ascending order of the first elements (we don't swap the elements in these lists, only the lists themselves); then we concatenate the lists into one list which becomes a new permutation. For example, the New Year transformation of p = [5, 4, 2, 3, 1, 7, 8, 6] is built as follows: We call a permutation good if the result of its transformation is the same as the permutation itself. For example, [4, 3, 1, 2, 8, 5, 6, 7] is a good permutation; and [5, 4, 2, 3, 1, 7, 8, 6] is bad, since the result of transformation is [4, 2, 3, 5, 1, 8, 6, 7] . Your task is the following: given n and k , find the k -th (lexicographically) good permutation of length n . The first line contains one integer t ( 1 <= "...

Tutorials

Educational Codeforces Round 79 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
67760241 rainboy E Dec. 27, 2019, 9:43 p.m. OK GNU C11 TESTS 37 202 0 2700
67747141 Prabowo E Dec. 27, 2019, 4:54 p.m. OK GNU C++11 TESTS 37 31 0 2700
67774645 train_driver E Dec. 28, 2019, 8:27 a.m. OK GNU C++11 TESTS 37 31 0 2700
68009662 Samui E Dec. 31, 2019, 3:03 p.m. OK GNU C++11 TESTS 37 31 0 2700
67775993 georgerapeanu E Dec. 28, 2019, 8:59 a.m. OK GNU C++11 TESTS 37 31 0 2700
67725675 QAQAutoMaton E Dec. 27, 2019, 3:30 p.m. OK GNU C++11 TESTS 37 31 4198400 2700
67876885 Pyqe E Dec. 29, 2019, 1:39 p.m. OK GNU C++11 TESTS 37 46 0 2700
68061804 frodakcin E Jan. 2, 2020, 4:49 a.m. OK GNU C++11 TESTS 37 46 0 2700
67776077 XLor E Dec. 28, 2019, 9:01 a.m. OK GNU C++11 TESTS 37 46 0 2700
69585299 sandoval E Jan. 26, 2020, 7:10 p.m. OK GNU C++11 TESTS 37 46 0 2700
68079356 illuminati_XY E Jan. 2, 2020, 1:47 p.m. OK GNU C++11 TESTS 37 46 0 2700
67748860 kotatsugame E Dec. 27, 2019, 5:14 p.m. OK GNU C++14 TESTS 37 31 0 2700
67770563 farmerboy E Dec. 28, 2019, 6:35 a.m. OK GNU C++14 TESTS 37 31 0 2700
67751056 nikolapesic2802 E Dec. 27, 2019, 5:51 p.m. OK GNU C++14 TESTS 37 31 102400 2700
67749868 nikolapesic2802 E Dec. 27, 2019, 5:30 p.m. OK GNU C++14 TESTS 37 31 102400 2700
67751872 nikolapesic2802 E Dec. 27, 2019, 6:04 p.m. OK GNU C++14 TESTS 37 31 102400 2700
67752151 nikolapesic2802 E Dec. 27, 2019, 6:09 p.m. OK GNU C++14 TESTS 37 31 204800 2700
67745983 sava-cska E Dec. 27, 2019, 4:43 p.m. OK GNU C++14 TESTS 37 31 204800 2700
67733789 step_by_step E Dec. 27, 2019, 3:55 p.m. OK GNU C++14 TESTS 37 31 204800 2700
67986646 gasin E Dec. 30, 2019, 11:30 p.m. OK GNU C++14 TESTS 37 31 204800 2700
68973409 Nson E Jan. 17, 2020, 7:55 a.m. OK GNU C++14 TESTS 37 46 0 2700
68623154 Leonardo_Blanger E Jan. 11, 2020, 7:59 p.m. OK GNU C++17 TESTS 37 30 0 2700
67743408 VahitGuetta E Dec. 27, 2019, 4:32 p.m. OK GNU C++17 TESTS 37 31 0 2700
68479641 gyz_gyz E Jan. 10, 2020, 7:12 a.m. OK GNU C++17 TESTS 37 31 0 2700
68415270 NgodingTuApa E Jan. 8, 2020, 6:36 p.m. OK GNU C++17 TESTS 37 31 0 2700
68401112 RedGrey1993 E Jan. 8, 2020, 1:12 p.m. OK GNU C++17 TESTS 37 31 0 2700
68036304 Drice E Jan. 1, 2020, 12:13 p.m. OK GNU C++17 TESTS 37 31 0 2700
67953882 jiangly E Dec. 30, 2019, 8:49 a.m. OK GNU C++17 TESTS 37 31 0 2700
67774478 ILLLZKQF E Dec. 28, 2019, 8:23 a.m. OK GNU C++17 TESTS 37 31 0 2700
67748986 Deemo E Dec. 27, 2019, 5:16 p.m. OK GNU C++17 TESTS 37 31 0 2700
67734831 imeimi E Dec. 27, 2019, 3:59 p.m. OK GNU C++17 TESTS 37 31 0 2700
68101765 eidan E Jan. 3, 2020, 3:49 a.m. OK Haskell TESTS 37 701 102400 2700
68101821 eidan E Jan. 3, 2020, 3:54 a.m. OK Haskell TESTS 37 717 102400 2700
67760175 Dukkha E Dec. 27, 2019, 9:40 p.m. OK Java 11 TESTS 37 280 0 2700
67735284 uwi E Dec. 27, 2019, 4 p.m. OK Java 8 TESTS 37 140 0 2700
67762346 martins E Dec. 27, 2019, 11:54 p.m. OK Java 8 TESTS 37 171 0 2700
67768476 Teban54 E Dec. 28, 2019, 5:35 a.m. OK Java 8 TESTS 37 327 0 2700
67937169 sergmel E Dec. 29, 2019, 8:59 p.m. OK Mono C# TESTS 37 374 6860800 2700
67751327 pichulia E Dec. 27, 2019, 5:55 p.m. OK MS C++ 2017 TESTS 37 46 0 2700
67750716 pajenegod E Dec. 27, 2019, 5:44 p.m. OK PyPy 2 TESTS 37 452 8396800 2700
68078284 rama_pang E Jan. 2, 2020, 1:26 p.m. OK PyPy 3 TESTS 37 343 9523200 2700
67748940 codercodercoder E Dec. 27, 2019, 5:15 p.m. OK PyPy 3 TESTS 37 358 9728000 2700
67860447 Origenes E Dec. 29, 2019, 7:59 a.m. OK PyPy 3 TESTS 37 405 9830400 2700
67752542 championlord E Dec. 27, 2019, 6:17 p.m. OK Python 3 TESTS 37 327 614400 2700
67737647 Golovanov399 E Dec. 27, 2019, 4:09 p.m. OK Python 3 TESTS 37 343 307200 2700
68307421 mahir01 E Jan. 6, 2020, 9:35 a.m. OK Python 3 TESTS 37 576 921600 2700
69301168 bmerry E Jan. 22, 2020, 1:51 p.m. OK Rust TESTS 37 62 102400 2700

remove filters

Back to search problems