CodeTON Round 9 (Div. 1 + Div. 2, Rated, Prizes!)

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
2039 CodeTON Round 9 (Div. 1 + Div. 2, Rated, Prizes!) FINISHED False 10800 44033123 Nov. 23, 2024, 2:35 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 102 ) H1 Cool Swap Walk (Easy Version) PROGRAMMING constructive algorithms implementation implementation sortings sortings

This is the easy version of the problem. The only difference is the maximum number of operations you can perform. You can only make hacks if both versions are solved. You are given an array (a) of size (n). A cool swap walk is the following process: In an (n \times n) grid, we note the cells in row (i) and column (j) as ((i, j)). You need to walk from ((1,1)) to ((n,n)), taking only steps to the right or down. Formally, if you are in ((x,y)) currently, you can step to either ((x+1,y)) or ((x,y+1)), but you can not step beyond the boundaries of the grid. When you step in ((i,j)), you must swap (a_i) and (a_j) when (i \neq j). You can perform at most (2n+4) cool swap walks . Sort the array (a_1, a_2, \ldots, a_n) in non-decreasing order. We can show that it's always possible to do so. The first line contains an integer (t) ((1 \le t \le 10^4)) — the number of test cases. The first line of each test case contains an integer (n) ((2 \leq n \leq 500)) — the size of the array. The second line of each test case contains (n) integers (a_1,a_2,\ldots ,a_n) ((1 \le a_i \le n)) — the elements of the array. It is guaranteed that the sum of (n^2) over all test cases does not exceed (2.5 \cdot 10^5). For each test case, your output should consist of several lines: The first line contains an integer (k) ((0 \leq k \leq 2n+4)), representing the number of cool swap walks you perform. Each of the next (k) lines contains a string (s) of length (2n-2) consisting only of R and D , representing the path (letters are case sensitive). For all (1 \le i \le 2n-2), if (s_i=) R , you walk right in the (i)-th step, otherwise you walk down in the (i)-th step. In the first test case, the array (a) is already non-decreasing, so you don't need to perform any walk. In the second test case, (a=2,1,3) initially. In the first walk: In the $$$1$$

Tutorials

Editorial of CodeTON Round 9 (Div. 1 + Div. 2)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
293021495 k1nsom H1 Nov. 24, 2024, 2:10 a.m. OK C++17 (GCC 7-32) TESTS 52 93 102400
292974786 qwef_ H1 Nov. 23, 2024, 4:53 p.m. OK C++17 (GCC 7-32) TESTS 52 124 1126400
292979607 Rewinding H1 Nov. 23, 2024, 5:08 p.m. OK C++17 (GCC 7-32) TESTS 52 139 4198400
292995746 LortyMorty H1 Nov. 23, 2024, 7:01 p.m. OK C++17 (GCC 7-32) TESTS 52 155 5017600
292982631 orzdevinwang H1 Nov. 23, 2024, 5:19 p.m. OK C++20 (GCC 13-64) TESTS 52 77 12083200
292972228 tourist H1 Nov. 23, 2024, 4:44 p.m. OK C++20 (GCC 13-64) TESTS 52 93 102400
292979169 ugly2333 H1 Nov. 23, 2024, 5:07 p.m. OK C++20 (GCC 13-64) TESTS 52 109 0
293028246 Normalizerr H1 Nov. 24, 2024, 4:26 a.m. OK C++23 (GCC 14-64, msys2) TESTS 52 62 102400
293027910 Normalizerr H1 Nov. 24, 2024, 4:20 a.m. OK C++23 (GCC 14-64, msys2) TESTS 52 62 102400
292992646 Ari H1 Nov. 23, 2024, 6:34 p.m. OK C++23 (GCC 14-64, msys2) TESTS 52 77 102400
292991490 green_gold_dog H1 Nov. 23, 2024, 6:27 p.m. OK C++23 (GCC 14-64, msys2) TESTS 52 77 102400
292982502 Kevin114514 H1 Nov. 23, 2024, 5:18 p.m. OK C++23 (GCC 14-64, msys2) TESTS 52 93 102400
292974164 ksun48 H1 Nov. 23, 2024, 4:51 p.m. OK C++23 (GCC 14-64, msys2) TESTS 52 93 102400

remove filters

Back to search problems