No.3538 Not First Place
Note
This problem has been confirmed to be solvable (AC) in C++ and Python, but some optimization may be required depending on the language or runtime.
Problem Statement
A popularity vote was held among $N$ candidates, numbered candidate $1, 2, \cdots, N$.
A total of $M$ people voted in this vote, and each person chose exactly $K$ candidates out of the $N$ candidates and voted for them.
For each $i\ (1\leq i\leq N)$, let $V_i$ be the number of votes received by candidate $i$, and define the sequence $V=(V_1, V_2, \cdots, V_N)$. How many possible sequences $V$ satisfy the following condition?
- Letting $\displaystyle V_{max}=\max_{1\leq i\leq N} V_i$, we have $V_{max}>V_1\geq L$.
Since the answer can be very large, find it modulo $998244353$.
Input
$N\ M\ K\ L$
- $2\leq N\leq 3000$
- $1\leq M\leq 3000$
- $1\leq K\leq N$
- $1\leq L\leq M$
- All inputs are integers.
Output
Let $m$ be the number of possible sequences $V$ satisfying the condition, modulo $998244353$. Print this $m$ on one line.
Print a newline at the end.
Sample
Sample 1
Input
5 3 1 1
Output
4
The $4$ sequences $V$ satisfying the condition are $(1, 2, 0, 0, 0), (1, 0, 2, 0, 0), (1, 0, 0, 2, 0), (1, 0, 0, 0, 2)$.
Sample 2
Input
3000 3000 1500 1500
Output
743177420
Note that you must find the answer modulo $998244353$.
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。
nauclhlt
もの