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 |
| 2199
|
Kotlin Heroes: Episode 14 |
FINISHED |
False |
9000 |
3943523 |
March 2, 2026, 2:35 p.m. |
Problems
You are given three arrays: array (a), initially consisting of (n) ones; array (b), initially consisting of (m) zeros; array (c), consisting of (m) integers from (1) to (50). We perform the following process on these arrays. The process consists of (m) stages. During the (i)-th stage, the following occurs: first, for each element of the array (a) , one of three actions is independently chosen: it is multiplied by some prime number, divided by some prime number (it cannot be divided by a number that does not divide the element evenly), or remains unchanged. You don't have to choose the same action or prime number for each element of (a); then you can either skip this step or choose any (k) such that (a_k = c_i), and assign (b_i = k). An array of (m) numbers from (0) to (n) is called achievable if it can be obtained as a result of this process as the array (b). Your task is to count the number of achievable arrays. The first line contains two integers (n) and (m) ((1 \le n, m \le 10^4)). The second line contains (m) integers (c_1, c_2, \dots, c_m) ((1 \le c_i \le 50)). Print one integer — the number of achievable arrays, taken modulo (998244353). |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|
365117504 |
ytanmay122005 |
I |
March 2, 2026, 4:30 p.m. |
OK |
Kotlin 1.7 |
TESTS |
88 |
593 |
51507200 |
|
|
|
365135947 |
raypraveen47 |
I |
March 2, 2026, 7:06 p.m. |
OK |
Kotlin 1.7 |
TESTS |
88 |
656 |
49561600 |
|
|
|
365118130 |
literalchild |
I |
March 2, 2026, 4:35 p.m. |
OK |
Kotlin 1.7 |
TESTS |
88 |
781 |
117555200 |
|
|
|
365115303 |
BucketPotato |
I |
March 2, 2026, 4:13 p.m. |
OK |
Kotlin 1.9 |
TESTS |
88 |
1015 |
0 |
|
|
|
365113430 |
arvindf232 |
I |
March 2, 2026, 3:57 p.m. |
OK |
Kotlin 2.2 |
TESTS |
88 |
390 |
43827200 |
|
|
|
365122299 |
PelicanPilot |
I |
March 2, 2026, 5:06 p.m. |
OK |
Kotlin 2.2 |
TESTS |
88 |
437 |
23756800 |
|
|
|
365159224 |
thanhnguyxn07 |
I |
March 3, 2026, 1:46 a.m. |
OK |
Kotlin 2.2 |
TESTS |
88 |
531 |
43622400 |
|
|
|
365119438 |
Sugar_fan |
I |
March 2, 2026, 4:45 p.m. |
OK |
Kotlin 2.2 |
TESTS |
88 |
562 |
26726400 |
|
|
|
365116212 |
Golovanov399 |
I |
March 2, 2026, 4:20 p.m. |
OK |
Kotlin 2.2 |
TESTS |
88 |
578 |
26828800 |
|
|
|
365162831 |
Stevekotlarz |
I |
March 3, 2026, 2:59 a.m. |
OK |
Kotlin 2.2 |
TESTS |
88 |
1171 |
84889600 |
|
|
|
365125834 |
Fysty |
I |
March 2, 2026, 5:36 p.m. |
OK |
Kotlin 2.2 |
TESTS |
88 |
1234 |
92569600 |
|
|
|
365119826 |
__baozii__ |
I |
March 2, 2026, 4:48 p.m. |
OK |
Kotlin 2.2 |
TESTS |
88 |
1593 |
24883200 |
|
|
|
365117074 |
potato167 |
I |
March 2, 2026, 4:26 p.m. |
OK |
Kotlin 2.2 |
TESTS |
88 |
1656 |
24064000 |
|
|
remove filters
Back to search problems