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 |
---|---|---|---|---|---|---|
1907 | Codeforces Round 913 (Div. 3) | FINISHED | False | 8100 | 30035699 | Dec. 5, 2023, 2:45 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 4945 ) | F | Shift and Reverse | PROGRAMMING | greedy sortings |
B'Given an array of integers a_1, a_2, ldots, a_n . You can make two types of operations with this array: Your task is to sort the array in non-decreasing order using the minimal number of operations, or say that it is impossible. The first line of input contains a single integer t ( 1 <= t <= 10^4 ) -- the number of test cases. Descriptions of test cases follow. The first line of each test case contains an integer n ( 1 <= n <= 10^5 ) -- size of the array. The second line of each test case contains n integers a_1, a_2, ldots, a_n ( 1 <= a_i <= 10^9 ) -- elements of the array. It is guaranteed that sum of n over all test cases does not exceed 2 cdot 10^5 . For each test case output the number k , the minimal number of operations you need to sort the array. If it is impossible to sort the array using these operations, output -1 . In the first test case of the example, to sort the array [ 3, 2, 1, 5, 4 ] you need to perform 3 operations: In the third test case of the example, it can be shown that it is impossible to sort the array using the given operations. In the seventh test case of the example, to sort the array [ 4, 1, 3, 4, 4 ] you need to perform 3 operations: '... |
Codeforces Round 913 (Div. 3) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
235947522 | dream2023 | F | Dec. 5, 2023, 4:54 p.m. | OK | C# 10 | TESTS | 12 | 62 | 8704000 | ||
235992604 | ldu20232210258 | F | Dec. 6, 2023, 3:55 a.m. | OK | GNU C++14 | TESTS | 14 | 46 | 409600 | ||
235949179 | TypeYippie | F | Dec. 5, 2023, 4:58 p.m. | OK | GNU C++14 | TESTS | 12 | 46 | 409600 | ||
235951880 | Chaotically | F | Dec. 5, 2023, 5:06 p.m. | OK | GNU C++14 | TESTS | 12 | 46 | 819200 | ||
235949751 | YZJ_B | F | Dec. 5, 2023, 4:59 p.m. | OK | GNU C++14 | TESTS | 12 | 46 | 819200 | ||
235995632 | YOUR-SUN | F | Dec. 6, 2023, 4:45 a.m. | OK | GNU C++14 | TESTS | 14 | 46 | 921600 | ||
235946010 | harshjaiswalcr7 | F | Dec. 5, 2023, 4:51 p.m. | OK | GNU C++14 | TESTS | 12 | 46 | 5939200 | ||
235953793 | quangthang2605 | F | Dec. 5, 2023, 5:16 p.m. | OK | GNU C++14 | TESTS | 12 | 46 | 7987200 | ||
235974356 | khamar | F | Dec. 5, 2023, 8:53 p.m. | OK | GNU C++14 | TESTS | 14 | 46 | 16076800 | ||
235994669 | ritik108 | F | Dec. 6, 2023, 4:30 a.m. | OK | GNU C++14 | TESTS | 14 | 61 | 512000 | ||
235974747 | m.arush | F | Dec. 5, 2023, 8:59 p.m. | OK | GNU C++14 | TESTS | 14 | 61 | 819200 | ||
235953281 | ScottChou | F | Dec. 5, 2023, 5:13 p.m. | OK | GNU C++17 | TESTS | 12 | 46 | 409600 | ||
235993753 | oloy | F | Dec. 6, 2023, 4:15 a.m. | OK | GNU C++17 | TESTS | 14 | 46 | 512000 | ||
235954406 | IAmiron | F | Dec. 5, 2023, 5:20 p.m. | OK | GNU C++17 | TESTS | 12 | 46 | 512000 | ||
235952896 | TnMurder5000 | F | Dec. 5, 2023, 5:11 p.m. | OK | GNU C++17 | TESTS | 12 | 46 | 512000 | ||
235951620 | Ayush2272 | F | Dec. 5, 2023, 5:05 p.m. | OK | GNU C++17 | TESTS | 12 | 46 | 512000 | ||
235950397 | Akhliddin | F | Dec. 5, 2023, 4:59 p.m. | OK | GNU C++17 | TESTS | 12 | 46 | 512000 | ||
235949978 | Greating | F | Dec. 5, 2023, 4:59 p.m. | OK | GNU C++17 | TESTS | 12 | 46 | 512000 | ||
235948830 | chennie | F | Dec. 5, 2023, 4:57 p.m. | OK | GNU C++17 | TESTS | 12 | 46 | 512000 | ||
235943652 | geetika21 | F | Dec. 5, 2023, 4:45 p.m. | OK | GNU C++17 | TESTS | 12 | 46 | 512000 | ||
235968942 | sr2005roy | F | Dec. 5, 2023, 7:38 p.m. | OK | GNU C++17 | TESTS | 12 | 46 | 819200 | ||
235969271 | Ferrriccc | F | Dec. 5, 2023, 7:42 p.m. | OK | GNU C++17 (64) | TESTS | 14 | 15 | 512000 | ||
235982970 | FlowRays | F | Dec. 6, 2023, 12:44 a.m. | OK | GNU C++17 (64) | TESTS | 14 | 15 | 3072000 | ||
235982839 | Binp | F | Dec. 6, 2023, 12:40 a.m. | OK | GNU C++17 (64) | TESTS | 14 | 31 | 409600 | ||
235992591 | linjiangli | F | Dec. 6, 2023, 3:54 a.m. | OK | GNU C++17 (64) | TESTS | 14 | 31 | 512000 | ||
235990544 | caomuyilin | F | Dec. 6, 2023, 3:17 a.m. | OK | GNU C++17 (64) | TESTS | 14 | 31 | 819200 | ||
235990263 | xiangji | F | Dec. 6, 2023, 3:12 a.m. | OK | GNU C++17 (64) | TESTS | 14 | 31 | 819200 | ||
235988345 | zime_www | F | Dec. 6, 2023, 2:43 a.m. | OK | GNU C++17 (64) | TESTS | 14 | 31 | 819200 | ||
235983170 | Raven_c | F | Dec. 6, 2023, 12:51 a.m. | OK | GNU C++17 (64) | TESTS | 14 | 31 | 819200 | ||
236000006 | Domination_Devil | F | Dec. 6, 2023, 5:43 a.m. | OK | GNU C++17 (64) | TESTS | 14 | 31 | 921600 | ||
235951484 | lococ | F | Dec. 5, 2023, 5:04 p.m. | OK | GNU C++17 (64) | TESTS | 12 | 31 | 921600 | ||
235988290 | cmk666 | F | Dec. 6, 2023, 2:42 a.m. | OK | GNU C++20 (64) | TESTS | 14 | 15 | 1126400 | ||
235985750 | Yufi1210 | F | Dec. 6, 2023, 1:55 a.m. | OK | GNU C++20 (64) | TESTS | 14 | 30 | 819200 | ||
235993785 | trainingbot_01 | F | Dec. 6, 2023, 4:16 a.m. | OK | GNU C++20 (64) | TESTS | 14 | 31 | 409600 | ||
235987276 | fzcdream | F | Dec. 6, 2023, 2:26 a.m. | OK | GNU C++20 (64) | TESTS | 14 | 31 | 409600 | ||
235981031 | Saul0906 | F | Dec. 5, 2023, 11:42 p.m. | OK | GNU C++20 (64) | TESTS | 14 | 31 | 409600 | ||
235968975 | rohitjazz199955 | F | Dec. 5, 2023, 7:39 p.m. | OK | GNU C++20 (64) | TESTS | 12 | 31 | 409600 | ||
235968190 | chethan78 | F | Dec. 5, 2023, 7:30 p.m. | OK | GNU C++20 (64) | TESTS | 12 | 31 | 409600 | ||
235954844 | QazallMaleki- | F | Dec. 5, 2023, 5:23 p.m. | OK | GNU C++20 (64) | TESTS | 12 | 31 | 409600 | ||
235954694 | qmdjfislw | F | Dec. 5, 2023, 5:22 p.m. | OK | GNU C++20 (64) | TESTS | 12 | 31 | 409600 | ||
235947187 | Eslam_Saleh | F | Dec. 5, 2023, 4:54 p.m. | OK | GNU C++20 (64) | TESTS | 12 | 31 | 409600 | ||
235982891 | 0x3F | F | Dec. 6, 2023, 12:42 a.m. | OK | Go | TESTS | 14 | 78 | 2662400 | ||
235959926 | druti6 | F | Dec. 5, 2023, 6:02 p.m. | OK | Java 11 | TESTS | 12 | 358 | 4096000 | ||
235956943 | Yousef_Badr | F | Dec. 5, 2023, 5:38 p.m. | OK | Java 11 | TESTS | 12 | 374 | 4915200 | ||
235970616 | 28leoleo28 | F | Dec. 5, 2023, 8 p.m. | OK | Java 17 | TESTS | 14 | 218 | 1024000 | ||
235947183 | Liiii | F | Dec. 5, 2023, 4:54 p.m. | OK | Java 17 | TESTS | 12 | 280 | 307200 | ||
235943932 | keduolimm | F | Dec. 5, 2023, 4:46 p.m. | OK | Java 21 | TESTS | 12 | 312 | 102400 | ||
235964019 | NerfThis | F | Dec. 5, 2023, 6:42 p.m. | OK | Java 8 | TESTS | 12 | 139 | 0 | ||
235946602 | MintCat | F | Dec. 5, 2023, 4:52 p.m. | OK | Java 8 | TESTS | 12 | 186 | 0 | ||
235944384 | 1091857051 | F | Dec. 5, 2023, 4:47 p.m. | OK | Java 8 | TESTS | 12 | 202 | 14028800 | ||
235972762 | Sumitsingh7 | F | Dec. 5, 2023, 8:29 p.m. | OK | Java 8 | TESTS | 14 | 295 | 19148800 | ||
235982525 | ElBarbados | F | Dec. 6, 2023, 12:31 a.m. | OK | MS C++ 2017 | TESTS | 14 | 124 | 512000 | ||
235957552 | ExtractStars | F | Dec. 5, 2023, 5:43 p.m. | OK | MS C++ 2017 | TESTS | 12 | 124 | 2457600 | ||
235989715 | maikh07 | F | Dec. 6, 2023, 3:04 a.m. | OK | MS C++ 2017 | TESTS | 14 | 187 | 409600 | ||
235950033 | ebesso | F | Dec. 5, 2023, 4:59 p.m. | OK | PyPy 3 | TESTS | 12 | 405 | 87347200 | ||
235949787 | satama6 | F | Dec. 5, 2023, 4:59 p.m. | OK | PyPy 3 | TESTS | 12 | 530 | 11673600 | ||
235947333 | kavorka | F | Dec. 5, 2023, 4:54 p.m. | OK | PyPy 3-64 | TESTS | 12 | 155 | 14540800 | ||
235975950 | SamuelTull | F | Dec. 5, 2023, 9:23 p.m. | OK | PyPy 3-64 | TESTS | 14 | 155 | 17817600 | ||
235961193 | sixthcore | F | Dec. 5, 2023, 6:15 p.m. | OK | PyPy 3-64 | TESTS | 12 | 187 | 29081600 | ||
235968776 | SoleProprietor | F | Dec. 5, 2023, 7:36 p.m. | OK | PyPy 3-64 | TESTS | 12 | 280 | 19148800 | ||
235957164 | sushmanth.dampur8780 | F | Dec. 5, 2023, 5:40 p.m. | OK | PyPy 3-64 | TESTS | 12 | 296 | 18124800 | ||
235963914 | scyyyyyyyyyy | F | Dec. 5, 2023, 6:41 p.m. | OK | PyPy 3-64 | TESTS | 12 | 327 | 24166400 | ||
235949913 | shubham6105 | F | Dec. 5, 2023, 4:59 p.m. | OK | PyPy 3-64 | TESTS | 12 | 358 | 18329600 | ||
235982089 | linhua | F | Dec. 6, 2023, 12:18 a.m. | OK | PyPy 3-64 | TESTS | 14 | 358 | 23347200 | ||
235958614 | hnust_yangzimo | F | Dec. 5, 2023, 5:51 p.m. | OK | PyPy 3-64 | TESTS | 12 | 373 | 21094400 | ||
235980788 | spiriton | F | Dec. 5, 2023, 11:33 p.m. | OK | PyPy 3-64 | TESTS | 14 | 405 | 17715200 | ||
235950756 | timostar1 | F | Dec. 5, 2023, 5:02 p.m. | OK | Python 3 | TESTS | 12 | 171 | 12083200 | ||
235945473 | Yorik123 | F | Dec. 5, 2023, 4:50 p.m. | OK | Python 3 | TESTS | 12 | 249 | 13312000 | ||
235954857 | zhdanovich | F | Dec. 5, 2023, 5:23 p.m. | OK | Python 3 | TESTS | 12 | 295 | 13721600 | ||
235952456 | points_engineering | F | Dec. 5, 2023, 5:09 p.m. | OK | Rust 2021 | TESTS | 12 | 109 | 5632000 |
Back to search problems