問題一覧 > 通常問題

No.2472 Tea time in the grand garden

レベル : / AI推定難易度 : 2075 / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 14
作問者 : SPD_9X2 / テスター : akakimidori りあん tsutaj beet 👑 tute7627 nok0 👑 rin204 だれ momoyuu KKT89
お気に入りにしたユーザー ProblemId : 9827 / 自分の提出
問題文最終更新日: 2023-09-17 19:24:31
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Back to the original
Japan Alumni Group Summer Camp 2023 Day 2 (順位表) の他の問題:

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もしくは右上の雲マークをクリックしてアカウントを作成してください。