AtCoder Grand Contest 069
翻译中…
Problem Statement
翻译中…
You are given integers $N$, $M$, $X$, and $Y$.
翻译中…
Find the number, modulo $998244353$, of pairs $(A, B)$ of sequences $A=(a_1,\ldots,a_N)$ and $B=(b_1,\ldots,b_N)$ that satisfy all of the following conditions:
翻译中…
$A = (a_1, \ldots, a_N)$is a sequence of non-negative integers.$B = (b_1, \ldots, b_N)$is a subsequence of$(0, 1, \ldots, M - 1)$.$\sum\limits_{i=1}^{N} a_i = X$.$\sum\limits_{i=1}^{N} a_i b_i = Y$.
翻译中…
Constraints
翻译中…
$1 \leq N \leq M \leq 2 \times 10^5$$1 \leq X, Y \leq 2 \times 10^5$- All input values are integers.
翻译中…
Input
翻译中…
The input is given from Standard Input in the following format:
翻译中…
N M X Y
翻译中…
Output
翻译中…
Print the answer modulo $998244353$.
翻译中…
样例
Input #1
3 4 3 4
Output #1
5
Here are the five pairs $(A, B)$ satisfying the conditions:
- $A = (0, 2, 1)$, $B = (0, 1, 2)$
- $A = (1, 0, 2)$, $B = (0, 1, 2)$
- $A = (1, 1, 1)$, $B = (0, 1, 3)$
- $A = (1, 2, 0)$, $B = (0, 2, 3)$
- $A = (2, 1, 0)$, $B = (1, 2, 3)$
Input #2
1 1 1 1
Output #2
0
There are no pairs $(A, B)$ satisfying the conditions.
Input #3
12345 67890 9876 54321
Output #3
150392014
Find the count modulo $998244353$.
题目信息
题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。