AtCoder Regular Contest 173
翻译中…
Problem Statement
翻译中…
There is a blackboard with a set of positive integers written on it. Initially, the set $S=\lbrace 1,2,\dots,A,A+1,A+2,\dots,A+B\rbrace$ is written on the blackboard.
翻译中…
Takahashi wants to perform the following operation $N-1$ times to have $N$ sets on the blackboard:
翻译中…
- From the sets of integers written on the blackboard, choose a set
$S_0$that contains at least one element not greater than$A$and at least one element not less than$A+1$. From the chosen set$S_0$, choose one element$a$not greater than$A$and one element$b$not less than$A+1$. Erase the set$S_0$from the blackboard and write two sets$S_1$and$S_2$of his choice that satisfy all of the following conditions: - The union of
$S_1$and$S_2$is$S_0$, and they have no common elements.$a \in S_1, b \in S_2$
翻译中…
Find the number of possible ways to perform the series of operations, modulo $998244353$.
翻译中…
Here, two series of operations are distinguished when there is an $i\ (1 \leq i \leq N-1)$ such that $S_0$, $a$, $b$, $S_1$, or $S_2$ chosen in the $i$-th operation of one series is different from that of the other series.
翻译中…
Constraints
翻译中…
$2 \leq N \leq 2 \times 10^5$$1 \leq A,B \leq 2 \times 10^5$$N \leq A+B$- All input values are integers.
翻译中…
Input
翻译中…
The input is given from Standard Input in the following format:
翻译中…
N A B
翻译中…
Output
翻译中…
Print the answer.
翻译中…
样例
Input #1
3 2 4
Output #1
1728
One possible series of operations is as follows:
- Choose $S_0=\lbrace 1,2,3,4,5,6\rbrace$, let $a=2$ and $b=5$, and let $S_1 =\lbrace 1,2,3,6\rbrace$ and $S_2=\lbrace 4,5\rbrace$. There are now two sets of integers written on the blackboard: $\lbrace 1,2,3,6\rbrace$ and $\lbrace 4,5\rbrace$.
- Choose $S_0=\lbrace 1,2,3,6\rbrace$, let $a=1$ and $b=3$, and let $S_1 = \lbrace1,2\rbrace$ and $S_2=\lbrace 3,6\rbrace$. There are now three sets of integers written on the blackboard: $\lbrace 1,2\rbrace$, $\lbrace 3,6\rbrace$, and $\lbrace 4,5\rbrace$.
Input #2
4 1 3
Output #2
6
If we let $a=1$ and $b=2$ and let $S_1 = \lbrace 1\rbrace$ and $S_2 = \lbrace 2,3,4\rbrace$ in the first operation, we can no longer perform the second and subsequent operations.
Do not count these cases where we cannot complete $N-1$ operations.
Input #3
5 6 6
Output #3
84486693
Input #4
173173 173173 173173
Output #4
446948086
题目信息
题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。