Score : $600$ points
Takahashi has $A$ apple seedlings, $B$ banana seedlings, and $C$ cherry seedlings. Seedlings of the same kind cannot be distinguished.
He will plant these seedlings in his $N$ gardens so that all of the following conditions are satisfied.
How many ways are there to plant seedlings to satisfy the conditions? Find the count modulo $998244353$.
Two ways are distinguished when there is a garden with different sets of seedlings planted in these two ways.
Input is given from Standard Input in the following format:
$N$ $A$ $B$ $C$
Print the answer.
2 2 1 1
21
As illustrated below, there are $21$ ways to plant seedlings to satisfy the conditions.
(The two frames arranged vertically are the gardens. $A, B, C$ stand for apple, banana, cherry, respectively.)
2 0 0 0
0
There may be no way to plant seedlings to satisfy the conditions.
2 0 2 2
9
100 12 34 56
769445780
5000000 2521993 2967363 3802088
264705492