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 |
|---|---|---|---|---|---|---|
| 2048 | Codeforces Global Round 28 | FINISHED | False | 10800 | 41786723 | Dec. 19, 2024, 2:35 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 734 ) | G | Kevin and Matrices | PROGRAMMING | combinatorics math |
Kevin has been transported to Sacred Heart Hospital, which contains all the (n \times m) matrices with integer values in the range (1,v). Now, Kevin wants to befriend some matrices, but he is willing to befriend a matrix (a) if and only if the following condition is satisfied: () \min_{1\le i\le n}\left(\max_{1\le j\le m}a_{i,j}\right)\le\max_{1\le j\le m}\left(\min_{1\le i\le n}a_{i,j}\right). () Please count how many matrices in Sacred Heart Hospital can be friends with Kevin. Since Kevin is very friendly, there could be many matrices that meet this condition. Therefore, you only need to output the result modulo (998\,244\,353). Each test contains multiple test cases. The first line contains the number of test cases (t) ((1 \le t \le 8\cdot 10^3)). The only line of each test case contains three integers (n), (m), (v) ((1 \le n, v, n \cdot v \leq 10^6), (1 \le m \le 10^9)). It is guaranteed that the sum of (n \cdot v) over all test cases doesn't exceed (10^6). For each test case, output one integer — the number of matrices that can be friends with Kevin modulo (998\,244\,353). In the first test case, besides the matrices (a=\begin{bmatrix}1&2\\2&1\end{bmatrix}) and (a=\begin{bmatrix}2&1\\1&2\end{bmatrix}), which do not satisfy the condition, the remaining (2^{2 \cdot 2} - 2 = 14) matrices can all be friends with Kevin. |
| Tutorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 297379847 | KellyWLJ | G | Dec. 20, 2024, 3:35 a.m. | OK | C++17 (GCC 7-32) | TESTS | 30 | 1562 | 8294400 | ||
| 297334534 | al3xstr33t | G | Dec. 19, 2024, 4:58 p.m. | OK | C++17 (GCC 7-32) | TESTS | 30 | 1562 | 16076800 | ||
| 297373174 | ciuim | G | Dec. 20, 2024, 1:11 a.m. | OK | C++17 (GCC 7-32) | TESTS | 30 | 1608 | 16076800 | ||
| 297380439 | Austin__Griffin | G | Dec. 20, 2024, 3:45 a.m. | OK | C++17 (GCC 7-32) | TESTS | 30 | 1624 | 16076800 | ||
| 297339852 | recollect_ii | G | Dec. 19, 2024, 5:16 p.m. | OK | C++17 (GCC 7-32) | TESTS | 30 | 1781 | 48128000 | ||
| 297343088 | NitricOxide | G | Dec. 19, 2024, 5:27 p.m. | OK | C++17 (GCC 7-32) | TESTS | 30 | 1874 | 12390400 | ||
| 297336932 | ko_osaga | G | Dec. 19, 2024, 5:06 p.m. | OK | C++17 (GCC 7-32) | TESTS | 30 | 2046 | 8499200 | ||
| 297336266 | golomb | G | Dec. 19, 2024, 5:04 p.m. | OK | C++17 (GCC 7-32) | TESTS | 30 | 2249 | 16076800 | ||
| 297374514 | wutongchun | G | Dec. 20, 2024, 1:48 a.m. | OK | C++17 (GCC 7-32) | TESTS | 30 | 2265 | 24064000 | ||
| 297342328 | SongOfPredawn | G | Dec. 19, 2024, 5:24 p.m. | OK | C++17 (GCC 7-32) | TESTS | 30 | 2343 | 16076800 | ||
| 297372792 | chenjunxiu | G | Dec. 20, 2024, 12:59 a.m. | OK | C++20 (GCC 13-64) | TESTS | 30 | 468 | 16076800 | ||
| 297370842 | MridulAhi | G | Dec. 19, 2024, 11:58 p.m. | OK | C++20 (GCC 13-64) | TESTS | 30 | 484 | 16076800 | ||
| 297386532 | afuafu | G | Dec. 20, 2024, 5:14 a.m. | OK | C++20 (GCC 13-64) | TESTS | 30 | 484 | 32153600 | ||
| 297351306 | maxplus | G | Dec. 19, 2024, 6:40 p.m. | OK | C++20 (GCC 13-64) | TESTS | 30 | 499 | 8089600 | ||
| 297334587 | Liuxizai | G | Dec. 19, 2024, 4:59 p.m. | OK | C++20 (GCC 13-64) | TESTS | 30 | 499 | 16076800 | ||
| 297360833 | sleep__ | G | Dec. 19, 2024, 8:15 p.m. | OK | C++20 (GCC 13-64) | TESTS | 30 | 499 | 20070400 | ||
| 297352287 | J_B_Y | G | Dec. 19, 2024, 6:47 p.m. | OK | C++20 (GCC 13-64) | TESTS | 30 | 515 | 4300800 | ||
| 297389298 | lsj2009 | G | Dec. 20, 2024, 5:45 a.m. | OK | C++20 (GCC 13-64) | TESTS | 30 | 515 | 8089600 | ||
| 297338569 | hbxql. | G | Dec. 19, 2024, 5:12 p.m. | OK | C++20 (GCC 13-64) | TESTS | 30 | 515 | 16076800 | ||
| 297337896 | SATSKY_2024target_IGM | G | Dec. 19, 2024, 5:09 p.m. | OK | C++20 (GCC 13-64) | TESTS | 30 | 515 | 20172800 | ||
| 297378784 | jimmyywang | G | Dec. 20, 2024, 3:17 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 30 | 343 | 24064000 | ||
| 297364859 | tkacper | G | Dec. 19, 2024, 9:14 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 30 | 421 | 6656000 | ||
| 297381512 | juan_123 | G | Dec. 20, 2024, 4:03 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 30 | 452 | 32153600 | ||
| 297379605 | MtSaka | G | Dec. 20, 2024, 3:31 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 30 | 499 | 4505600 | ||
| 297357430 | automaton | G | Dec. 19, 2024, 7:35 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 30 | 499 | 8089600 | ||
| 297391258 | Marckess | G | Dec. 20, 2024, 6:04 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 30 | 531 | 24064000 | ||
| 297381364 | xuyifei1 | G | Dec. 20, 2024, 4:01 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 30 | 561 | 16076800 | ||
| 297335811 | neal | G | Dec. 19, 2024, 5:02 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 30 | 562 | 8192000 | ||
| 297380649 | dongyc666 | G | Dec. 20, 2024, 3:49 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 30 | 562 | 16076800 | ||
| 297334151 | fallleaves01 | G | Dec. 19, 2024, 4:57 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 30 | 577 | 4403200 | ||
| 297371150 | rainboy | G | Dec. 20, 2024, 12:09 a.m. | OK | GNU C11 | TESTS | 30 | 1046 | 24166400 | ||
| 297338727 | Tlatoani | G | Dec. 19, 2024, 5:12 p.m. | OK | Kotlin 1.9 | TESTS | 30 | 5937 | 18944000 |
Back to search problems