AtCoder Regular Contest 212 (Div. 2)
翻译中…
Problem Statement
翻译中…
There are $N$ white balls. First, you paint each ball red or blue.
翻译中…
Then, you place these $N$ red or blue painted balls in one of $M$ distinguishable boxes.
翻译中…
Let $a_i$ and $b_i$ be the number of red and blue balls in the $i$-th box, respectively.
翻译中…
Find the sum, modulo $998244353$, of $\prod_{1\leq i \le M}|a_i-b_i|$ over all ways to place the balls.
翻译中…
Here, two ways of placing balls are different if and only if at least one of $a_i$ and $b_i$ is different for some $i$.
翻译中…
Particularly, balls are not distinguished from each other.
翻译中…
Constraints
翻译中…
$1 \le N,M \le 10^7$- All input values are integers.
翻译中…
Input
翻译中…
The input is given from Standard Input in the following format:
翻译中…
N M
翻译中…
Output
翻译中…
Output the answer.
翻译中…
样例
Input #1
2 1
Output #1
4
There are three ways to place balls in box $1$.
If you place one red ball and one blue ball, $|a_1-b_1|=0$.
If you place two red balls or two blue balls, $|a_1-b_1|=2$.
Therefore, the answer is $0 + 2 + 2 = 4$.
Input #2
5 7
Output #2
0
Input #3
10000000 5000000
Output #3
965172629
题目信息
题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。