Score : $2200$ points
We have two indistinguishable pieces placed on a number line. Both pieces are initially at coordinate $0$. (They can occupy the same position.)
We can do the following two kinds of operations:
We want to do a total of $N$ operations of these kinds in some order so that one of the pieces will be at coordinate $A$ and the other at coordinate $B$. Find the number of ways to move the pieces to achieve it. The answer can be enormous, so compute the count modulo $998244353$.
Two ways to move the pieces are considered different if and only if there exists an integer $i$ ($1 \leq i \leq N$) such that the set of the coordinates occupied by the pieces after the $i$-th operation is different in those two ways.
Input is given from Standard Input in the following format:
$N$ $A$ $B$
Print the number of ways to move the pieces to achieve our objective, modulo $998244353$.
5 1 3
4
Shown below are the four ways to move the pieces, where $(x,y)$ represents the state where the two pieces are at coordinates $x$ and $y$.
10 0 0
1
10 4 6
197
1000000 100000 200000
758840509