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 |
|---|---|---|---|---|---|---|
| 2247 | Codeforces Round 1111 (Div. 2) | FINISHED | False | 7200 | 2301887 | July 18, 2026, 2:35 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 421 ) | F | Paths on a Grid | PROGRAMMING | data structures dp hashing |
You are given a grid (a) of size (n \times m). The rows are numbered from (1) to (n) from top to bottom, and the columns are numbered from (1) to (m) from left to right. Each cell of the grid is either blocked or free. Cells ((1, 1)) and ((n, m)) are free. A set (S) of cells of (a), which may include blocked cells , is called good if the following conditions hold: (S) is non-empty; for every cell ((i, j)) belonging to (S), every path from ((1, 1)) to ((n, m)) that passes only through free cells, moves one cell down or one cell right at each step, and passes through ((i, j)) also passes through all other cells of (S). Count the number of good sets of cells of (a) modulo (998\,244\,353). Each test contains multiple test cases. The first line contains the number of test cases (t) ((1 \le t \le 10^4)). The description of the test cases follows. The first line of each test case contains two integers (n) and (m) ((1 \le n \cdot m \le 10^6)). The (i)-th of the following (n) lines contains a string (a_{i, 1} a_{i, 2} \ldots a_{i, m}) ((a_{i, j} \in \{0, 1\})) — the (i)-th row of the grid. If (a_{i, j} = 1), then cell ((i, j)) is free; otherwise, it is blocked. It is guaranteed that (a_{1, 1} = a_{n, m} = 1). It is guaranteed that the sum of (n \cdot m) over all test cases does not exceed (10^6). For each test case, output a single integer — the answer to the problem modulo (998\,244\,353). In the first example, the only non-empty set of cells is (\{(1, 1)\}), and it is good . Therefore, the answer is (1). In the third example, there is no path from ((1, 1)) to ((2, 2)) that passes only through free cells. Therefore, every non-empty set of cells is good , so the answer is (2^4 - 1 = 15). In the fifth example, the set (\{(2, 2), (3, 2)\}) is good because every path from ((1, 1)) to ((4, 4)) that p |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 383372128 | takshkothari | F | July 18, 2026, 4:33 p.m. | OK | C++17 (GCC 7-32) | TESTS | 29 | 296 | 86220800 | ||
| 383383395 | proxmox | F | July 18, 2026, 5:49 p.m. | OK | C++17 (GCC 7-32) | TESTS | 29 | 312 | 72192000 | ||
| 383370906 | n_xeapop | F | July 18, 2026, 4:29 p.m. | OK | C++17 (GCC 7-32) | TESTS | 29 | 328 | 60620800 | ||
| 383393213 | myfather2211 | F | July 18, 2026, 7:25 p.m. | OK | C++17 (GCC 7-32) | TESTS | 29 | 328 | 134348800 | ||
| 383408002 | Vedant_Asati | F | July 19, 2026, 12:50 a.m. | OK | C++17 (GCC 7-32) | TESTS | 29 | 343 | 100249600 | ||
| 383396105 | aslam_45 | F | July 18, 2026, 8:02 p.m. | OK | C++17 (GCC 7-32) | TESTS | 29 | 406 | 134451200 | ||
| 383368718 | Jia_Tan | F | July 18, 2026, 4:23 p.m. | OK | C++17 (GCC 7-32) | TESTS | 29 | 421 | 147968000 | ||
| 383365582 | Ashick_MD | F | July 18, 2026, 4:18 p.m. | OK | C++17 (GCC 7-32) | TESTS | 29 | 453 | 100249600 | ||
| 383377686 | cabhi1111 | F | July 18, 2026, 4:59 p.m. | OK | C++17 (GCC 7-32) | TESTS | 29 | 515 | 140288000 | ||
| 383381118 | milky0002 | F | July 18, 2026, 5:28 p.m. | OK | C++17 (GCC 7-32) | TESTS | 29 | 562 | 230604800 | ||
| 383403645 | quantum_x | F | July 18, 2026, 10:28 p.m. | OK | C++20 (GCC 13-64) | TESTS | 29 | 187 | 88268800 | ||
| 383359716 | Asakizz | F | July 18, 2026, 4:01 p.m. | OK | C++20 (GCC 13-64) | TESTS | 29 | 218 | 142643200 | ||
| 383378708 | kotatsugame | F | July 18, 2026, 5:06 p.m. | OK | C++20 (GCC 13-64) | TESTS | 29 | 234 | 65024000 | ||
| 383405160 | kaiboy | F | July 18, 2026, 11:16 p.m. | OK | C++20 (GCC 13-64) | TESTS | 29 | 234 | 234700800 | ||
| 383415866 | CharlesTheImmortal | F | July 19, 2026, 3:27 a.m. | OK | C++20 (GCC 13-64) | TESTS | 29 | 343 | 80281600 | ||
| 383371978 | Kozakai__Aya | F | July 18, 2026, 4:32 p.m. | OK | C++20 (GCC 13-64) | TESTS | 29 | 453 | 125337600 | ||
| 383376743 | TKT_YI | F | July 18, 2026, 4:52 p.m. | OK | C++20 (GCC 13-64) | TESTS | 29 | 750 | 362291200 | ||
| 383382993 | ChallaSmileSofia | F | July 18, 2026, 5:45 p.m. | OK | C++20 (GCC 13-64) | TESTS | 29 | 1000 | 99225600 | ||
| 383401868 | kylin0610 | F | July 18, 2026, 9:44 p.m. | OK | C++20 (GCC 13-64) | TESTS | 29 | 1015 | 367104000 | ||
| 383371205 | Free_Dela_Hoya | F | July 18, 2026, 4:30 p.m. | OK | C++20 (GCC 13-64) | TESTS | 29 | 1171 | 423219200 | ||
| 383405103 | kaiboy | F | July 18, 2026, 11:14 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 29 | 140 | 234700800 | ||
| 383360794 | analyzeK | F | July 18, 2026, 4:04 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 29 | 156 | 108441600 | ||
| 383409274 | tkdgkb | F | July 19, 2026, 1:24 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 29 | 187 | 74035200 | ||
| 383378181 | harshitsengar2006 | F | July 18, 2026, 5:03 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 29 | 203 | 71372800 | ||
| 383401123 | jeroenodb | F | July 18, 2026, 9:28 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 29 | 250 | 136499200 | ||
| 383412969 | dooglius | F | July 19, 2026, 2:53 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 29 | 265 | 151552000 | ||
| 383408638 | wjx_awa | F | July 19, 2026, 1:06 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 29 | 296 | 269619200 | ||
| 383396501 | scorpion_79 | F | July 18, 2026, 8:07 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 29 | 390 | 65945600 | ||
| 383428111 | TOMO | F | July 19, 2026, 5:47 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 29 | 406 | 131481600 | ||
| 383425645 | liaoyanxu | F | July 19, 2026, 5:06 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 29 | 437 | 301568000 | ||
| 383371387 | blueberryishere | F | July 18, 2026, 4:31 p.m. | OK | Java 21 | TESTS | 29 | 671 | 170905600 | ||
| 383369263 | arijiiiitttt | F | July 18, 2026, 4:25 p.m. | OK | Java 21 | TESTS | 29 | 1062 | 193024000 | ||
| 383372288 | sachin-123 | F | July 18, 2026, 4:33 p.m. | OK | Java 21 | TESTS | 29 | 2796 | 346828800 | ||
| 383403064 | apollo | F | July 18, 2026, 10:15 p.m. | OK | Kotlin 1.7 | TESTS | 29 | 562 | 180531200 |
Back to search problems