| Kotlin Heroes: Episode 14 |
|---|
| Finished |
You are given three arrays:
We perform the following process on these arrays. The process consists of $$$m$$$ stages. During the $$$i$$$-th stage, the following occurs:
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$$$.
4 34 2 3
21
2 41 2 3 4
51
1 247 34
3
| Name |
|---|


