#P15711. [JAG 2023 Summer Camp #2] Tea time in the grand garden

[JAG 2023 Summer Camp #2] Tea time in the grand garden

题目描述

Appropriate temperature changes are essential for brewing delicious tea. Noli has been taught a recipe for delicious tea.

The recipe is represented by a sequence of non-negative integers A=a0,a1,a2,,aN,aN+1A = a_0, a_1, a_2, \ldots, a_N, a_{N+1} of length N+2N+2. She must change the temperature accordingly.

Raising the temperature is hard work. The cost of a recipe AA is defined by the following f(A)f(A).

f(A)=i=0Nmax(0,ai+1ai)f(A) = \sum_{i=0}^{N} \max(0, a_{i+1} - a_i)

Noli has forgotten the recipe she was taught. All she remembers is that a0=aN+1=0a_0 = a_{N+1} = 0 and that the cost was KK.

How many possible recipes can be considered? Find the remainder of the number of possible recipes divided by 998244353998244353.

Note that two recipes are different when the values of aia_i are different for any i(0iN+1)i (0 \leq i \leq N+1).

输入格式

N KN \ K

The input satisfies the following constraints.

  • All inputs consist of integers.
  • 1N2×1051 \leq N \leq 2 \times 10^5
  • 0K2×1050 \leq K \leq 2 \times 10^5

输出格式

Output the remainder of the number of possible recipes divided by 998244353998244353. Add a new line at the end of the output.

2 2
5
100 0 
1
300 300
527212271
200000 200000
885086300

提示

In Sample Input 1, There are five possible sequences AA.

  • {0,2,0,0}\{0,2,0,0\}
  • {0,0,2,0}\{0,0,2,0\}
  • {0,1,2,0}\{0,1,2,0\}
  • {0,2,1,0}\{0,2,1,0\}
  • {0,2,2,0}\{0,2,2,0\}