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 |
---|---|---|---|---|---|---|
1733 | Codeforces Round 821 (Div. 2) | FINISHED | False | 7200 | 68225099 | Sept. 19, 2022, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 15780 ) | C | Parity Shuffle Sorting | PROGRAMMING | constructive algorithms sortings |
B"You are given an array a with n non-negative integers. You can apply the following operation on it. Find any sequence of at most n operations that makes a non-decreasing. It can be proven that it is always possible. Note that you do not have to minimize the number of operations. An array a_1, a_2, ldots, a_n is non-decreasing if and only if a_1 <= a_2 <= ldots <= a_n . The first line contains one integer t ( 1 <= t <= 10^5 ) -- the number of test cases. Each test case consists of two lines. The first line of each test case contains one integer n ( 1 <= n <= 10^5 ) -- the length of the array. The second line of each test case contains n integers a_1, a_2, ldots, a_n ( 0 <= a_i <= 10^9 ) -- the array itself. It is guaranteed that the sum of n over all test cases doesn't exceed 10^5 . For each test case, print one integer m ( 0 <= m <= n ), the number of operations, in the first line. Then print m lines. Each line must contain two integers l_i, r_i , which are the indices you chose in the i -th operation ( 1 <= l_i < r_i <= n ). If there are multiple solutions, print any of them. In the second test case, a changes like this: In the first and third test cases, a is already non-decreasing. "... |
Codeforces Round #821 (Div. 2) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
172766448 | IPJ | C | Sept. 19, 2022, 9:55 p.m. | OK | GNU C++14 | TESTS | 14 | 46 | 409600 | ||
172742605 | GMXH | C | Sept. 19, 2022, 5:10 p.m. | OK | GNU C++14 | TESTS | 14 | 46 | 1740800 | ||
172789307 | ljs111 | C | Sept. 20, 2022, 5:56 a.m. | OK | GNU C++14 | TESTS | 14 | 46 | 2048000 | ||
172742990 | Sarah_montasser | C | Sept. 19, 2022, 5:12 p.m. | OK | GNU C++14 | TESTS | 14 | 46 | 2252800 | ||
172735653 | Drama_Queen | C | Sept. 19, 2022, 4:29 p.m. | OK | GNU C++14 | TESTS | 14 | 46 | 2252800 | ||
172769995 | QQH | C | Sept. 19, 2022, 11:56 p.m. | OK | GNU C++14 | TESTS | 14 | 46 | 2764800 | ||
172772264 | OTK_Shadi | C | Sept. 20, 2022, 12:54 a.m. | OK | GNU C++14 | TESTS | 14 | 61 | 409600 | ||
172770740 | zhuoli | C | Sept. 20, 2022, 12:17 a.m. | OK | GNU C++14 | TESTS | 14 | 61 | 409600 | ||
172754741 | rons_07 | C | Sept. 19, 2022, 6:51 p.m. | OK | GNU C++14 | TESTS | 14 | 61 | 409600 | ||
172742614 | obaydullahmhs | C | Sept. 19, 2022, 5:10 p.m. | OK | GNU C++14 | TESTS | 14 | 61 | 409600 | ||
172788812 | sumitrawat10 | C | Sept. 20, 2022, 5:49 a.m. | OK | GNU C++17 | TESTS | 14 | 46 | 409600 | ||
172774879 | ChenYanyv | C | Sept. 20, 2022, 1:48 a.m. | OK | GNU C++17 | TESTS | 14 | 46 | 409600 | ||
172783533 | JwChen | C | Sept. 20, 2022, 4:31 a.m. | OK | GNU C++17 | TESTS | 14 | 46 | 1638400 | ||
172769987 | emoreira | C | Sept. 19, 2022, 11:55 p.m. | OK | GNU C++17 | TESTS | 14 | 46 | 2048000 | ||
172761245 | DEDA | C | Sept. 19, 2022, 8:14 p.m. | OK | GNU C++17 | TESTS | 14 | 46 | 2048000 | ||
172757989 | runde | C | Sept. 19, 2022, 7:29 p.m. | OK | GNU C++17 | TESTS | 14 | 46 | 2048000 | ||
172747714 | LordExplosion7647 | C | Sept. 19, 2022, 5:45 p.m. | OK | GNU C++17 | TESTS | 14 | 46 | 2048000 | ||
172746877 | DEDAnot | C | Sept. 19, 2022, 5:38 p.m. | OK | GNU C++17 | TESTS | 14 | 46 | 2048000 | ||
172779640 | john123456 | C | Sept. 20, 2022, 3:21 a.m. | OK | GNU C++17 | TESTS | 14 | 46 | 2457600 | ||
172763497 | Ima74 | C | Sept. 19, 2022, 8:52 p.m. | OK | GNU C++17 | TESTS | 14 | 46 | 2662400 | ||
172787846 | LowLightK | C | Sept. 20, 2022, 5:36 a.m. | OK | GNU C++17 (64) | TESTS | 14 | 46 | 409600 | ||
172776800 | w23c3c3 | C | Sept. 20, 2022, 2:27 a.m. | OK | GNU C++17 (64) | TESTS | 14 | 46 | 409600 | ||
172769908 | User_Carrot | C | Sept. 19, 2022, 11:53 p.m. | OK | GNU C++17 (64) | TESTS | 14 | 46 | 409600 | ||
172749158 | MaGnsi0 | C | Sept. 19, 2022, 5:57 p.m. | OK | GNU C++17 (64) | TESTS | 14 | 46 | 409600 | ||
172771450 | hangs | C | Sept. 20, 2022, 12:36 a.m. | OK | GNU C++17 (64) | TESTS | 14 | 46 | 819200 | ||
172754182 | tonkitude | C | Sept. 19, 2022, 6:45 p.m. | OK | GNU C++17 (64) | TESTS | 14 | 46 | 819200 | ||
172748024 | burak | C | Sept. 19, 2022, 5:48 p.m. | OK | GNU C++17 (64) | TESTS | 14 | 46 | 819200 | ||
172743596 | programmer765 | C | Sept. 19, 2022, 5:15 p.m. | OK | GNU C++17 (64) | TESTS | 14 | 46 | 819200 | ||
172789596 | Wang_Yuan | C | Sept. 20, 2022, 5:59 a.m. | OK | GNU C++17 (64) | TESTS | 14 | 46 | 1228800 | ||
172737362 | Wang_Yuan | C | Sept. 19, 2022, 4:32 p.m. | OK | GNU C++17 (64) | TESTS | 14 | 46 | 1228800 |
Back to search problems