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 |
|---|---|---|---|---|---|---|
| 2176 | Codeforces Round 1070 (Div. 2) | FINISHED | False | 7200 | 10941923 | Dec. 11, 2025, 2:35 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 1463 ) | F | Omega Numbers | PROGRAMMING | bitmasks dp math number theory |
For a given number (n), consider the function (\omega(n)), which is equal to the number of unique prime numbers in the prime factorization of the number (n). For example, (\omega (12) = \omega (2^2 \cdot 3) = 2). And (\omega (120) = \omega (2^3 \cdot 3 \cdot 5) = 3). For an array of natural numbers (a) and a natural number (k), we define (\operatorname{f}(a, k) = \sum_{i < j} \omega(a_i \cdot a_j)^k) for all (i < j). You are given an array of natural numbers (a) of length (n) and a natural number (k). Calculate (\operatorname{f}(a, k)) 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 2 integers (n) and (k) ((1 \leq n \leq 2 \cdot 10^5, 1 \leq k \leq 10^9)) —the length of the array (a) and the exponent of the operation, respectively. The second line of each test case contains (n) natural numbers (a_1, a_2, \ldots, a_n) ((1 \leq a_i \leq n)) —the array (a). It is guaranteed that the sum of (n) across all test cases does not exceed (2 \cdot 10^5). For each test case, output a single line containing an integer — the value of the function (\operatorname{f}(a, k)) modulo (998\,244\,353). Explanation of the first test case example: For any pair ((i,j)), the value (\omega(x)) for the product is (\omega(3^2) = 1). There are a total of (6) pairs, and the exponent is (1). The final answer is (6). Explanation of the second test case example: In any pair of the second test case, the product of the numbers in the pair equals (1), so the number of primes in it is (0). Therefore, the final answer is also (0). Explanation of the third test case example: Consider all pairs ((i,j)): ((1,2)): the product of the numbers at positions (1) and (2) |
| Codeforces Round 1070 (Div.2) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 353086538 | -firefly- | F | Dec. 11, 2025, 4:21 p.m. | OK | C# 13 | TESTS | 80 | 1453 | 65126400 | ||
| 353086052 | SachinScripts | F | Dec. 11, 2025, 4:20 p.m. | OK | C++17 (GCC 7-32) | TESTS | 80 | 218 | 6860800 | ||
| 353086529 | Acheronl | F | Dec. 11, 2025, 4:21 p.m. | OK | C++17 (GCC 7-32) | TESTS | 80 | 250 | 18022400 | ||
| 353085682 | Profesor_programiranja | F | Dec. 11, 2025, 4:19 p.m. | OK | C++17 (GCC 7-32) | TESTS | 80 | 265 | 3379200 | ||
| 353129134 | sunyx | F | Dec. 12, 2025, 12:52 a.m. | OK | C++17 (GCC 7-32) | TESTS | 87 | 281 | 26112000 | ||
| 353091388 | sahilsi | F | Dec. 11, 2025, 4:31 p.m. | OK | C++17 (GCC 7-32) | TESTS | 80 | 312 | 15257600 | ||
| 353092325 | vivektyagi08 | F | Dec. 11, 2025, 4:33 p.m. | OK | C++17 (GCC 7-32) | TESTS | 80 | 328 | 27340800 | ||
| 353087874 | with_care | F | Dec. 11, 2025, 4:24 p.m. | OK | C++17 (GCC 7-32) | TESTS | 80 | 421 | 9011200 | ||
| 353088270 | Dipanshu07r | F | Dec. 11, 2025, 4:25 p.m. | OK | C++17 (GCC 7-32) | TESTS | 80 | 421 | 25292800 | ||
| 353086818 | Terme | F | Dec. 11, 2025, 4:22 p.m. | OK | C++17 (GCC 7-32) | TESTS | 80 | 421 | 69734400 | ||
| 353092293 | Terrobyte-sama | F | Dec. 11, 2025, 4:33 p.m. | OK | C++17 (GCC 7-32) | TESTS | 80 | 437 | 38707200 | ||
| 353128694 | oranger_20 | F | Dec. 12, 2025, 12:36 a.m. | OK | C++20 (GCC 13-64) | TESTS | 87 | 109 | 13926400 | ||
| 353101995 | Rubikun | F | Dec. 11, 2025, 5:57 p.m. | OK | C++20 (GCC 13-64) | TESTS | 80 | 140 | 4300800 | ||
| 353084012 | Great_coder003 | F | Dec. 11, 2025, 4:15 p.m. | OK | C++20 (GCC 13-64) | TESTS | 80 | 140 | 5734400 | ||
| 353146665 | acccccccc | F | Dec. 12, 2025, 5:47 a.m. | OK | C++20 (GCC 13-64) | TESTS | 87 | 156 | 8089600 | ||
| 353129856 | fisher199 | F | Dec. 12, 2025, 1:16 a.m. | OK | C++20 (GCC 13-64) | TESTS | 87 | 156 | 12492800 | ||
| 353101393 | Rubikun | F | Dec. 11, 2025, 5:53 p.m. | OK | C++20 (GCC 13-64) | TESTS | 80 | 218 | 4300800 | ||
| 353089526 | Phan_minh_Duc | F | Dec. 11, 2025, 4:28 p.m. | OK | C++20 (GCC 13-64) | TESTS | 80 | 218 | 8089600 | ||
| 353084067 | McPqndq | F | Dec. 11, 2025, 4:15 p.m. | OK | C++20 (GCC 13-64) | TESTS | 80 | 234 | 1638400 | ||
| 353142859 | infCraft | F | Dec. 12, 2025, 5:16 a.m. | OK | C++20 (GCC 13-64) | TESTS | 87 | 234 | 7475200 | ||
| 353088327 | azim_7000_ | F | Dec. 11, 2025, 4:25 p.m. | OK | C++20 (GCC 13-64) | TESTS | 80 | 234 | 59801600 | ||
| 353125457 | hungchi17 | F | Dec. 11, 2025, 10:43 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 87 | 78 | 2457600 | ||
| 353099063 | 415411 | F | Dec. 11, 2025, 5:40 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 80 | 78 | 2457600 | ||
| 353148458 | gooonn | F | Dec. 12, 2025, 6:07 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 87 | 93 | 2457600 | ||
| 353100023 | toufiqhasankiron | F | Dec. 11, 2025, 5:46 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 80 | 125 | 2457600 | ||
| 353099224 | 415411 | F | Dec. 11, 2025, 5:41 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 80 | 125 | 2457600 | ||
| 353103410 | snuzh | F | Dec. 11, 2025, 6:06 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 82 | 125 | 7475200 | ||
| 353090186 | Dulat-E-009-.28 | F | Dec. 11, 2025, 4:29 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 80 | 140 | 6963200 | ||
| 353091969 | wojtekm4726 | F | Dec. 11, 2025, 4:32 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 80 | 156 | 7475200 | ||
| 353100417 | Luis_AQM | F | Dec. 11, 2025, 5:48 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 80 | 156 | 14540800 | ||
| 353143166 | -msu- | F | Dec. 12, 2025, 5:19 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 87 | 171 | 6963200 | ||
| 353090222 | whiteduke69 | F | Dec. 11, 2025, 4:29 p.m. | OK | GNU C11 | TESTS | 80 | 546 | 33792000 | ||
| 353091660 | joxamp3 | F | Dec. 11, 2025, 4:32 p.m. | OK | Go | TESTS | 80 | 484 | 45363200 | ||
| 353148741 | __baozii__ | F | Dec. 12, 2025, 6:10 a.m. | OK | Go | TESTS | 87 | 625 | 43929600 | ||
| 353101975 | penny_ka_leoNerd | F | Dec. 11, 2025, 5:57 p.m. | OK | Java 21 | TESTS | 80 | 1218 | 50892800 | ||
| 353089677 | Vishalll_ | F | Dec. 11, 2025, 4:28 p.m. | OK | Java 8 | TESTS | 80 | 1406 | 73830400 | ||
| 353104868 | arvindf232 | F | Dec. 11, 2025, 6:16 p.m. | OK | Kotlin 1.7 | TESTS | 82 | 1640 | 212684800 | ||
| 353102017 | SalicylicAcid | F | Dec. 11, 2025, 5:57 p.m. | OK | PyPy 3 | TESTS | 80 | 1390 | 168960000 | ||
| 353092877 | shadow4720 | F | Dec. 11, 2025, 4:34 p.m. | OK | PyPy 3-64 | TESTS | 80 | 593 | 55193600 | ||
| 353092969 | a_cedia | F | Dec. 11, 2025, 4:34 p.m. | OK | PyPy 3-64 | TESTS | 80 | 796 | 65536000 | ||
| 353116576 | jeroenodb | F | Dec. 11, 2025, 8:04 p.m. | OK | PyPy 3-64 | TESTS | 86 | 1109 | 46080000 | ||
| 353116885 | jeroenodb | F | Dec. 11, 2025, 8:08 p.m. | OK | PyPy 3-64 | TESTS | 87 | 1140 | 45977600 | ||
| 353122673 | KentShnurnikova | F | Dec. 11, 2025, 9:35 p.m. | OK | PyPy 3-64 | TESTS | 87 | 1484 | 445440000 | ||
| 353084290 | SumitKundu | F | Dec. 11, 2025, 4:16 p.m. | OK | PyPy 3-64 | TESTS | 80 | 1515 | 196096000 | ||
| 353106956 | Ayis137 | F | Dec. 11, 2025, 6:30 p.m. | OK | PyPy 3-64 | TESTS | 83 | 1562 | 78848000 | ||
| 353090824 | Sacred_Conqurer | F | Dec. 11, 2025, 4:30 p.m. | OK | PyPy 3-64 | TESTS | 80 | 1640 | 60313600 | ||
| 353083081 | LMeyling | F | Dec. 11, 2025, 4:13 p.m. | OK | PyPy 3-64 | TESTS | 80 | 1812 | 63590400 | ||
| 353111026 | PP2412 | F | Dec. 11, 2025, 7:05 p.m. | OK | Python 3 | TESTS | 86 | 2078 | 66150400 |
Back to search problems