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 |
---|---|---|---|---|---|---|
1768 | Codeforces Round 842 (Div. 2) | FINISHED | False | 7200 | 58893899 | Jan. 5, 2023, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 1906 ) | E | Partial Sorting | PROGRAMMING | combinatorics fft math number theory |
B"Consider a permutation ^ dagger p of length 3n . Each time you can do one of the following operations: We can show that every permutation can be made sorted in increasing order using only these operations. Let's call f(p) the minimum number of these operations needed to make the permutation p sorted in increasing order. Given n , find the sum of f(p) over all (3n)! permutations p of size 3n . Since the answer could be very large, output it modulo a prime M . ^ dagger A permutation of length n is an array consisting of n distinct integers from 1 to n in arbitrary order. For example, [2,3,1,5,4] is a permutation, but [1,2,2] is not a permutation ( 2 appears twice in the array), and [1,3,4] is also not a permutation ( n=3 but there is 4 in the array). The only line of input contains two numbers n and M ( 1 <= q n <= q 10^6 , 10^8 <= q M <= q 10^9 ). It is guaranteed that M is a prime number. Output the answer modulo M . In the first test case, all the permutations are: Therefore, the answer is 0+1+1+2+2+3=9 . "... |
Codeforces Round #842 (Div. 2) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
188150823 | tgehr | E | Jan. 5, 2023, 11:44 p.m. | OK | D | TESTS | 45 | 842 | 36352000 | ||
188126885 | rainboy | E | Jan. 5, 2023, 5:35 p.m. | OK | GNU C11 | TESTS | 45 | 654 | 36044800 | ||
188157485 | yyyyxh | E | Jan. 6, 2023, 2:51 a.m. | OK | GNU C++14 | TESTS | 45 | 140 | 48128000 | ||
188161552 | 2022haha | E | Jan. 6, 2023, 4:05 a.m. | OK | GNU C++14 | TESTS | 45 | 171 | 24064000 | ||
188120892 | sky_chen | E | Jan. 5, 2023, 4:33 p.m. | OK | GNU C++14 | TESTS | 45 | 171 | 24268800 | ||
188126222 | Iam1789 | E | Jan. 5, 2023, 5:33 p.m. | OK | GNU C++14 | TESTS | 45 | 171 | 48128000 | ||
188160485 | LeavingZ | E | Jan. 6, 2023, 3:46 a.m. | OK | GNU C++14 | TESTS | 45 | 171 | 48128000 | ||
188150418 | CuiZhenhang | E | Jan. 5, 2023, 11:27 p.m. | OK | GNU C++14 | TESTS | 45 | 171 | 49152000 | ||
188151193 | DitaMirika | E | Jan. 5, 2023, 11:58 p.m. | OK | GNU C++14 | TESTS | 45 | 186 | 24064000 | ||
188126541 | recollector | E | Jan. 5, 2023, 5:34 p.m. | OK | GNU C++14 | TESTS | 45 | 187 | 24064000 | ||
188157549 | Kaedehara_Kazuha_ | E | Jan. 6, 2023, 2:52 a.m. | OK | GNU C++14 | TESTS | 45 | 187 | 48128000 | ||
188161475 | steven144 | E | Jan. 6, 2023, 4:04 a.m. | OK | GNU C++14 | TESTS | 45 | 187 | 48128000 | ||
188148197 | xiaowuc1 | E | Jan. 5, 2023, 10:08 p.m. | OK | GNU C++17 | TESTS | 45 | 124 | 24064000 | ||
188150864 | kennyzzhang | E | Jan. 5, 2023, 11:45 p.m. | OK | GNU C++17 | TESTS | 45 | 171 | 11980800 | ||
188128469 | patou | E | Jan. 5, 2023, 5:44 p.m. | OK | GNU C++17 | TESTS | 45 | 171 | 24371200 | ||
188130741 | HOLlC | E | Jan. 5, 2023, 5:58 p.m. | OK | GNU C++17 | TESTS | 45 | 171 | 36044800 | ||
188149252 | vladburac | E | Jan. 5, 2023, 10:46 p.m. | OK | GNU C++17 | TESTS | 45 | 171 | 40140800 | ||
188141364 | Ssarpa | E | Jan. 5, 2023, 7:49 p.m. | OK | GNU C++17 | TESTS | 45 | 171 | 48128000 | ||
188134306 | jack112739 | E | Jan. 5, 2023, 6:24 p.m. | OK | GNU C++17 | TESTS | 45 | 171 | 48128000 | ||
188145083 | PS23 | E | Jan. 5, 2023, 8:52 p.m. | OK | GNU C++17 | TESTS | 45 | 171 | 48128000 | ||
188119137 | dreami63 | E | Jan. 5, 2023, 4:29 p.m. | OK | GNU C++17 | TESTS | 45 | 186 | 25088000 | ||
188167029 | B1ngFeng | E | Jan. 6, 2023, 5:24 a.m. | OK | GNU C++17 | TESTS | 45 | 186 | 48128000 | ||
188141962 | enslaved | E | Jan. 5, 2023, 7:58 p.m. | OK | GNU C++17 (64) | TESTS | 45 | 124 | 24064000 | ||
188159167 | LXH-cat | E | Jan. 6, 2023, 3:22 a.m. | OK | GNU C++17 (64) | TESTS | 45 | 124 | 24064000 | ||
188126074 | DmitryLzr | E | Jan. 5, 2023, 5:32 p.m. | OK | GNU C++17 (64) | TESTS | 45 | 140 | 24064000 | ||
188130479 | myoi0905 | E | Jan. 5, 2023, 5:56 p.m. | OK | GNU C++17 (64) | TESTS | 45 | 140 | 40140800 | ||
188145829 | ZiadEl-Gafy | E | Jan. 5, 2023, 9:08 p.m. | OK | GNU C++17 (64) | TESTS | 45 | 156 | 24064000 | ||
188145631 | ZiadEl-Gafy | E | Jan. 5, 2023, 9:03 p.m. | OK | GNU C++17 (64) | TESTS | 45 | 156 | 24064000 | ||
188150940 | zwh2008 | E | Jan. 5, 2023, 11:48 p.m. | OK | GNU C++17 (64) | TESTS | 45 | 171 | 48128000 | ||
188160302 | Cxny | E | Jan. 6, 2023, 3:43 a.m. | OK | GNU C++17 (64) | TESTS | 45 | 171 | 48128000 | ||
188157895 | Cxny | E | Jan. 6, 2023, 2:59 a.m. | OK | GNU C++17 (64) | TESTS | 45 | 171 | 48128000 | ||
188120006 | DanielW48 | E | Jan. 5, 2023, 4:31 p.m. | OK | GNU C++17 (64) | TESTS | 45 | 171 | 48128000 | ||
188129036 | nu50218 | E | Jan. 5, 2023, 5:47 p.m. | OK | GNU C++20 (64) | TESTS | 45 | 77 | 15974400 | ||
188126596 | czhang2718 | E | Jan. 5, 2023, 5:34 p.m. | OK | GNU C++20 (64) | TESTS | 45 | 77 | 48128000 | ||
188132739 | second_idiot | E | Jan. 5, 2023, 6:11 p.m. | OK | GNU C++20 (64) | TESTS | 45 | 78 | 24064000 | ||
188118138 | siganai | E | Jan. 5, 2023, 4:27 p.m. | OK | GNU C++20 (64) | TESTS | 45 | 124 | 24064000 | ||
188148027 | sreesh_56 | E | Jan. 5, 2023, 10:03 p.m. | OK | GNU C++20 (64) | TESTS | 45 | 139 | 40448000 | ||
188152044 | poplpr | E | Jan. 6, 2023, 12:29 a.m. | OK | GNU C++20 (64) | TESTS | 45 | 140 | 48025600 | ||
188152730 | Tx_Lcy | E | Jan. 6, 2023, 12:52 a.m. | OK | GNU C++20 (64) | TESTS | 45 | 155 | 48128000 | ||
188154189 | YuJiahe | E | Jan. 6, 2023, 1:36 a.m. | OK | GNU C++20 (64) | TESTS | 45 | 156 | 23961600 | ||
188154162 | xiaoziyao | E | Jan. 6, 2023, 1:35 a.m. | OK | GNU C++20 (64) | TESTS | 45 | 156 | 24064000 | ||
188164249 | cmk666 | E | Jan. 6, 2023, 4:48 a.m. | OK | GNU C++20 (64) | TESTS | 45 | 156 | 24064000 | ||
188135726 | merlin_ | E | Jan. 5, 2023, 6:36 p.m. | OK | Java 17 | TESTS | 45 | 483 | 67584000 | ||
188121887 | Dukkha | E | Jan. 5, 2023, 4:34 p.m. | OK | Java 17 | TESTS | 45 | 545 | 44032000 | ||
188158349 | xxafhixx | E | Jan. 6, 2023, 3:08 a.m. | OK | Java 17 | TESTS | 45 | 560 | 72294400 | ||
188143917 | golions | E | Jan. 5, 2023, 8:30 p.m. | OK | Java 8 | TESTS | 45 | 374 | 63897600 | ||
188144047 | 2020akadaver | E | Jan. 5, 2023, 8:33 p.m. | OK | Java 8 | TESTS | 45 | 1466 | 55808000 | ||
188143204 | golions | E | Jan. 5, 2023, 8:18 p.m. | OK | Java 8 | TESTS | 45 | 1481 | 63897600 | ||
188126408 | codicon | E | Jan. 5, 2023, 5:34 p.m. | OK | PyPy 3-64 | TESTS | 45 | 171 | 57139200 | ||
188131253 | Gleefre | E | Jan. 5, 2023, 6:01 p.m. | OK | PyPy 3-64 | TESTS | 45 | 327 | 35737600 | ||
188168684 | USYDLDH | E | Jan. 6, 2023, 5:43 a.m. | OK | PyPy 3-64 | TESTS | 45 | 343 | 51404800 | ||
188118092 | yupooh | E | Jan. 5, 2023, 4:27 p.m. | OK | PyPy 3-64 | TESTS | 45 | 343 | 78131200 | ||
188169657 | toam | E | Jan. 6, 2023, 5:54 a.m. | OK | PyPy 3-64 | TESTS | 45 | 358 | 74240000 | ||
188133680 | blue_ice_yj | E | Jan. 5, 2023, 6:19 p.m. | OK | PyPy 3-64 | TESTS | 45 | 436 | 51507200 | ||
188165974 | NINGucas | E | Jan. 6, 2023, 5:10 a.m. | OK | PyPy 3-64 | TESTS | 45 | 530 | 55500800 | ||
188159664 | ZrjaK | E | Jan. 6, 2023, 3:32 a.m. | OK | PyPy 3-64 | TESTS | 45 | 997 | 68505600 | ||
188155644 | taksqth | E | Jan. 6, 2023, 2:14 a.m. | OK | PyPy 3-64 | TESTS | 45 | 1029 | 50790400 | ||
188154954 | 00zijian | E | Jan. 6, 2023, 1:57 a.m. | OK | PyPy 3-64 | TESTS | 45 | 1060 | 53452800 |
Back to search problems