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 |
|---|---|---|---|---|---|---|
| 2040 | Codeforces Round 992 (Div. 2) | FINISHED | False | 7200 | 42737123 | Dec. 8, 2024, 2:35 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 449 ) | F | Number of Cubes | PROGRAMMING | combinatorics math number theory |
Consider a rectangular parallelepiped with sides (a), (b), and (c), that consists of unit cubes of (k) different colors. We can apply cyclic shifts to the parallelepiped in any of the three directions any number of times(^{\text{∗}}). There are (d_i) cubes of the (i)-th color ((1 \le i \le k)). How many different parallelepipeds (with the given sides) can be formed from these cubes, no two of which can be made equal by some combination of cyclic shifts? (^{\text{∗}})On the image: Top left shows the top view of the original parallelepiped. Lower layers will shift in the same way as the top layer. Top right shows the top view of a parallelepiped shifted to the right by (1). Bottom left shows the top view of a parallelepiped shifted down by (2). Bottom right shows the top view of a parallelepiped shifted to the right by (1) and down by (2). 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 four integers: (a), (b), (c), and (k) ((1 \le a, b, c \le 3 \cdot 10^6); (a \cdot b \cdot c \le 3 \cdot 10^6); (1 \le k \le 10^6)) — three sides of the parallelepiped and the number of colors of unit cubes. The second line of each test case contains (k) integers (d_1, d_2, \ldots, d_k) ((1 \le d_1 \le d_2 \le \ldots \le d_k \le 3 \cdot 10^6)) — the elements of the array (d): the number of cubes of a given color. It is guaranteed that in each test case the sum of the elements of the array (d) is equal to (a \cdot b \cdot c). It is guaranteed that the sum of (k) over all test cases does not exceed (10 ^ 6). For each test case, print one integer — the number of different parallelepipeds modulo (998\,244\,353). In the first test case, there is only one parallelepiped, which consists of one unit cube. |
| Codeforces Round #992 (Div.2) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 295635819 | mikehung | F | Dec. 8, 2024, 4:29 p.m. | OK | C++17 (GCC 7-32) | TESTS | 92 | 577 | 60416000 | ||
| 295660454 | Alpha_Q | F | Dec. 8, 2024, 7:43 p.m. | OK | C++17 (GCC 7-32) | TESTS | 92 | 577 | 72396800 | ||
| 295668987 | Heart_Blue | F | Dec. 8, 2024, 9:32 p.m. | OK | C++17 (GCC 7-32) | TESTS | 92 | 1312 | 64409600 | ||
| 295640175 | liympanda | F | Dec. 8, 2024, 4:58 p.m. | OK | C++17 (GCC 7-32) | TESTS | 92 | 1358 | 121651200 | ||
| 295689907 | hxano | F | Dec. 9, 2024, 3:24 a.m. | OK | C++17 (GCC 7-32) | TESTS | 92 | 1984 | 120320000 | ||
| 295689583 | masonpop | F | Dec. 9, 2024, 3:20 a.m. | OK | C++17 (GCC 7-32) | TESTS | 92 | 2077 | 164659200 | ||
| 295678810 | adam01 | F | Dec. 9, 2024, 1:28 a.m. | OK | C++20 (GCC 13-64) | TESTS | 92 | 218 | 75161600 | ||
| 295632157 | Agreb | F | Dec. 8, 2024, 4:20 p.m. | OK | C++20 (GCC 13-64) | TESTS | 92 | 281 | 24473600 | ||
| 295678293 | adam01 | F | Dec. 9, 2024, 1:23 a.m. | OK | C++20 (GCC 13-64) | TESTS | 92 | 343 | 63180800 | ||
| 295633402 | rniya | F | Dec. 8, 2024, 4:23 p.m. | OK | C++20 (GCC 13-64) | TESTS | 92 | 358 | 60825600 | ||
| 295640756 | FzArK | F | Dec. 8, 2024, 5 p.m. | OK | C++20 (GCC 13-64) | TESTS | 92 | 421 | 60416000 | ||
| 295643938 | MojeDes | F | Dec. 8, 2024, 5:18 p.m. | OK | C++20 (GCC 13-64) | TESTS | 92 | 452 | 36352000 | ||
| 295677637 | adam01 | F | Dec. 9, 2024, 1:17 a.m. | OK | C++20 (GCC 13-64) | TESTS | 92 | 499 | 63180800 | ||
| 295677233 | adam01 | F | Dec. 9, 2024, 1:09 a.m. | OK | C++20 (GCC 13-64) | TESTS | 92 | 499 | 63180800 | ||
| 295677268 | adam01 | F | Dec. 9, 2024, 1:10 a.m. | OK | C++20 (GCC 13-64) | TESTS | 92 | 515 | 63180800 | ||
| 295676659 | adam01 | F | Dec. 9, 2024, 12:53 a.m. | OK | C++20 (GCC 13-64) | TESTS | 92 | 530 | 66150400 | ||
| 295643456 | neal | F | Dec. 8, 2024, 5:15 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 92 | 312 | 86528000 | ||
| 295683711 | LNian | F | Dec. 9, 2024, 2:14 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 92 | 327 | 117350400 | ||
| 295649938 | lcyxds | F | Dec. 8, 2024, 6:03 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 92 | 358 | 88268800 | ||
| 295640755 | SniperX | F | Dec. 8, 2024, 5 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 92 | 390 | 60518400 | ||
| 295662033 | Marckess | F | Dec. 8, 2024, 8:01 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 92 | 452 | 96256000 | ||
| 295672848 | mariusdragos2308 | F | Dec. 8, 2024, 10:55 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 92 | 468 | 48537600 | ||
| 295642095 | dreamoon_love_AA | F | Dec. 8, 2024, 5:07 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 92 | 546 | 48537600 | ||
| 295684278 | timreizin | F | Dec. 9, 2024, 2:19 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 92 | 1062 | 86732800 | ||
| 295695915 | mrsunsss | F | Dec. 9, 2024, 4:19 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 92 | 1171 | 108748800 | ||
| 295688820 | panhuachao | F | Dec. 9, 2024, 3:12 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 92 | 1374 | 140288000 | ||
| 295632323 | jatloe | F | Dec. 8, 2024, 4:20 p.m. | OK | PyPy 3-64 | TESTS | 92 | 858 | 205004800 | ||
| 295642437 | Raj_Aryan_631 | F | Dec. 8, 2024, 5:09 p.m. | OK | PyPy 3-64 | TESTS | 92 | 890 | 203366400 | ||
| 295652314 | bronze_coder | F | Dec. 8, 2024, 6:23 p.m. | OK | PyPy 3-64 | TESTS | 92 | 2702 | 259891200 |
Back to search problems