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 |
|---|---|---|---|---|---|---|
| 2124 | EPIC Institute of Technology Round Summer 2025 (Codeforces Round 1036, Div. 1 + Div. 2) | FINISHED | False | 10800 | 24593123 | July 6, 2025, 2:35 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 1538 ) | F1 | Appending Permutations (Easy Version) | PROGRAMMING | combinatorics dp |
This is the easy version of the problem. The difference between the versions is that in this version, (n \leq 100). You can hack only if you solved all versions of this problem. You are given an initially empty array (a). You may perform the following operation any number of times: Choose an integer (s \ge 1) and append a cyclic shift of the array (1, 2, \ldots, s) to the end of (a). Formally, select integers (s) and (r) such that (1 \le r \le s), and append the array () r, r+1, \ldots, s, 1, 2, \ldots, r-1 () to the end of (a). () r, r+1, \ldots, s, 1, 2, \ldots, r-1 () to the end of (a). Your task is to count the number of distinct arrays of length exactly (n) that can be constructed using the allowed operation and satisfy all of the given restrictions. Two arrays are considered different if they differ at any position from (1) to (n). Print the answer modulo (998\,244\,353). Each test contains multiple test cases. The first line contains the number of test cases (t) ((1 \le t \le 100)). The description of the test cases follows. The first line of each test case contains two integers (n) and (m) ((1 \leq n \leq 100, 0 \leq m \leq \min(5000, n^2))) — denoting the length of the array (a) and the number of restrictions. The following (m) lines each contain two integers (i) and (x) ((1 \leq i,x \leq n)), indicating that (a_i\neq x) is a requirement of the final array. It is guaranteed that no limitation is given more than once. It is guaranteed that the sum of (n) over all test cases does not exceed (100), and the sum of (m) over all test cases does not exceed (5000). For each test case, output the number of arrays modulo (998\,244\,353). In the first test case, there are (7) total attainable arrays: (1,2,3, 2,3,1, 3,1,2, 1,1,2, 1,2,1, 2,1,1, 1,1,1). In the second test case, none of the above $$$7 |
| EPIC Institute of Technology Round Summer 2025 (Codeforces Round 1036, Div. 1 + Div. 2) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 327850159 | rulerofcakes | F1 | July 7, 2025, 12:21 a.m. | OK | C++17 (GCC 7-32) | TESTS | 28 | 46 | 102400 | ||
| 327843836 | LennartF22 | F1 | July 6, 2025, 9:32 p.m. | OK | C++17 (GCC 7-32) | TESTS | 28 | 46 | 102400 | ||
| 327842168 | yarorekiw | F1 | July 6, 2025, 9 p.m. | OK | C++17 (GCC 7-32) | TESTS | 28 | 61 | 102400 | ||
| 327876380 | surajbhan99 | F1 | July 7, 2025, 5:54 a.m. | OK | C++17 (GCC 7-32) | TESTS | 28 | 62 | 0 | ||
| 327819586 | wwwaz | F1 | July 6, 2025, 5:14 p.m. | OK | C++17 (GCC 7-32) | TESTS | 28 | 62 | 204800 | ||
| 327813561 | Teja-Smart | F1 | July 6, 2025, 4:53 p.m. | OK | C++17 (GCC 7-32) | TESTS | 28 | 62 | 10854400 | ||
| 327822304 | xhkrkdmyt | F1 | July 6, 2025, 5:24 p.m. | OK | C++17 (GCC 7-32) | TESTS | 28 | 77 | 102400 | ||
| 327821407 | gabrielwu | F1 | July 6, 2025, 5:21 p.m. | OK | C++17 (GCC 7-32) | TESTS | 28 | 77 | 102400 | ||
| 327813907 | SpinSpen | F1 | July 6, 2025, 4:54 p.m. | OK | C++17 (GCC 7-32) | TESTS | 28 | 77 | 102400 | ||
| 327809915 | Lithanium | F1 | July 6, 2025, 4:41 p.m. | OK | C++17 (GCC 7-32) | TESTS | 28 | 77 | 102400 | ||
| 327866258 | cfls_dpfs | F1 | July 7, 2025, 4:27 a.m. | OK | C++20 (GCC 13-64) | TESTS | 28 | 46 | 204800 | ||
| 327845916 | shinigami11 | F1 | July 6, 2025, 10:18 p.m. | OK | C++20 (GCC 13-64) | TESTS | 28 | 46 | 204800 | ||
| 327860710 | Donaldqian0712 | F1 | July 7, 2025, 3:18 a.m. | OK | C++20 (GCC 13-64) | TESTS | 28 | 46 | 4710400 | ||
| 327863734 | lmh_qwq | F1 | July 7, 2025, 3:54 a.m. | OK | C++20 (GCC 13-64) | TESTS | 28 | 46 | 326656000 | ||
| 327818141 | someone__ | F1 | July 6, 2025, 5:09 p.m. | OK | C++20 (GCC 13-64) | TESTS | 28 | 61 | 0 | ||
| 327832710 | OG_Matveychick1 | F1 | July 6, 2025, 7:05 p.m. | OK | C++20 (GCC 13-64) | TESTS | 28 | 61 | 102400 | ||
| 327832019 | oursaco | F1 | July 6, 2025, 6:59 p.m. | OK | C++20 (GCC 13-64) | TESTS | 28 | 61 | 102400 | ||
| 327853603 | MarioYC | F1 | July 7, 2025, 1:35 a.m. | OK | C++20 (GCC 13-64) | TESTS | 28 | 61 | 204800 | ||
| 327868210 | lightcreeper | F1 | July 7, 2025, 4:54 a.m. | OK | C++20 (GCC 13-64) | TESTS | 28 | 61 | 1228800 | ||
| 327862394 | nanani | F1 | July 7, 2025, 3:39 a.m. | OK | C++20 (GCC 13-64) | TESTS | 28 | 61 | 4710400 | ||
| 327864434 | michaelsxiang | F1 | July 7, 2025, 4:03 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 28 | 46 | 102400 | ||
| 327850915 | 7_divided_by_3 | F1 | July 7, 2025, 12:39 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 28 | 46 | 102400 | ||
| 327832013 | Mamedov | F1 | July 6, 2025, 6:59 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 28 | 46 | 102400 | ||
| 327871541 | Hayashi | F1 | July 7, 2025, 5:15 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 28 | 46 | 204800 | ||
| 327865370 | Greensheep | F1 | July 7, 2025, 4:14 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 28 | 46 | 402534400 | ||
| 327842819 | FzArK | F1 | July 6, 2025, 9:12 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 28 | 61 | 102400 | ||
| 327851969 | alumkal | F1 | July 7, 2025, 1 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 28 | 61 | 4403200 | ||
| 327861529 | Macesuted-Moe | F1 | July 7, 2025, 3:28 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 28 | 61 | 301260800 | ||
| 327832278 | Void_Wu | F1 | July 6, 2025, 7:01 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 28 | 62 | 0 | ||
| 327824629 | EMBailey | F1 | July 6, 2025, 5:32 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 28 | 62 | 0 | ||
| 327847292 | rainboy | F1 | July 6, 2025, 10:54 p.m. | OK | GNU C11 | TESTS | 28 | 61 | 225587200 | ||
| 327856408 | smilences | F1 | July 7, 2025, 2:22 a.m. | OK | PyPy 3-64 | TESTS | 28 | 108 | 3276800 | ||
| 327870900 | Huygd | F1 | July 7, 2025, 5:11 a.m. | OK | PyPy 3-64 | TESTS | 28 | 156 | 13004800 | ||
| 327821701 | stan23456 | F1 | July 6, 2025, 5:22 p.m. | OK | PyPy 3-64 | TESTS | 28 | 358 | 14028800 | ||
| 327809081 | Alex239 | F1 | July 6, 2025, 4:39 p.m. | OK | PyPy 3-64 | TESTS | 28 | 515 | 13619200 | ||
| 327841026 | Ayis137 | F1 | July 6, 2025, 8:41 p.m. | OK | PyPy 3-64 | TESTS | 28 | 780 | 10342400 | ||
| 327823847 | accelerate_nju | F1 | July 6, 2025, 5:29 p.m. | OK | PyPy 3-64 | TESTS | 28 | 921 | 9728000 | ||
| 327822812 | darkkcyan | F1 | July 6, 2025, 5:26 p.m. | OK | Rust 2021 | TESTS | 28 | 62 | 102400 | ||
| 327809302 | Ming_Xu | F1 | July 6, 2025, 4:39 p.m. | OK | Rust 2021 | TESTS | 28 | 155 | 102400 |
Back to search problems