No.2472 Tea time in the grand garden
Problem Statement
To brew delicious tea, the temperature must be changed appropriately. Noli has been taught a recipe for brewing delicious tea.
The recipe is represented by a sequence of non-negative integers $A = \{a_0,a_1,a_2,...,a_N,a_{N+1}\}$ of length $N+2$. Noli must change the temperature in order according to this sequence.
Raising the temperature is hard work. Therefore, the cost of a recipe $A$ is defined by the following $f(A)$.
$f(A) = \displaystyle\sum_{i=0}^{N} \mathrm{max}(0,a_{i+1}-a_i)$
Noli has forgotten the recipe she was taught. All she remembers is that $a_0 = a_{N+1} = 0$ and that the cost was $K$.
How many recipes $A$ could be the one she was taught? Find the number of possibilities modulo $998244353$.
Here, two recipes are considered different if the values of $a_i$ differ for some $i (0 \le i \le N+1)$.
Input
$N\ K$
- All inputs are integers.
- $1 \le N \le 2 \times 10^5$
- $0 \le K \le 2 \times 10^5$
Output
Print a newline at the end.
Sample
Sample 1
Input
2 2
Output
5
The following 5 sequences are possible as $A$.
- {0,2,0,0}
- {0,0,2,0}
- {0,1,2,0}
- {0,2,1,0}
- {0,2,2,0}
Sample 2
Input
100 0
Output
1
Sample 3
Input
300 300
Output
527212271
Sample 4
Input
200000 200000
Output
885086300
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。
SPD_9X2
akakimidori
りあん
tsutaj
beet
tute7627
nok0
だれ
momoyuu