AtCoder Regular Contest 160
翻译中…
Problem Statement
翻译中…
Find the number, modulo $998244353$, of sequences of $N$ non-negative integers $A=(A_1,A_2,\dots,A_N)$ totaling $M$ that satisfy the following condition.
翻译中…
- It is possible to make all elements of
$A$equal$0$by repeatedly choosing one of the following operations and performing it. - Choose an integer
$i$such that$1 \le i \le N$and decrease$A_i$by$K$.- Choose an integer
$i$such that$1 \le i \le N-K+1$and decrease each of$A_i,A_{i+1},\dots,A_{i+K-1}$by$1$.
- Choose an integer
翻译中…
Constraints
翻译中…
$1 \le K \le N \le 2000$$1 \le M \le 10^{18}$
翻译中…
Input
翻译中…
The input is given from Standard Input in the following format:
翻译中…
N M K
翻译中…
Output
翻译中…
Print the answer.
翻译中…
样例
Input #1
3 2 2
Output #1
5
The following five sequences satisfy the requirements.
- $(1,1,0)$
- $(0,1,1)$
- $(2,0,0)$
- $(0,2,0)$
- $(0,0,2)$
For instance, if $A=(0,1,1)$, you can do the following to make all elements of $A$ equal $0$.
- Perform the second operation. Choose $i = 2$ to decrease each of $A_2$ and $A_3$ by $1$, making $A=(0,0,0)$.
Input #2
100 998244353 100
Output #2
0
There may be no sequence that satisfies the requirements.
Input #3
2000 545782618661124208 533
Output #3
908877889
题目信息
题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。