QOJ.ac

QOJ

حد الوقت: 1.0 s حد الذاكرة: 1024 MB مجموع النقاط: 100

#10018. 水果茶

الإحصائيات

适当的温度变化对于制作美味的水果茶至关重要。Artemis 学习过一种美味茶饮的配方。

该配方由一个长度为 $n+2$ 的非负整数序列 $a = a_0, a_1, a_2, \dots, a_n, a_{n+1}$ 表示。在冲泡茶时,每个时刻 $i$ 的温度必须等于 $a_i$。

升高温度是一项艰巨的工作。配方 $a$ 的成本定义为 $f(a) = \sum_{i=0}^{n} \max(0, a_{i+1} - a_i)$。

Artemis 忘记了她学过的配方。她只记得 $a_0 = a_{n+1} = 0$,且成本为 $k$。

有多少种可能的配方满足这些约束条件?由于这个数字可能非常大,请输出其对 $998\,244\,353$ 取模的结果。

如果存在某个时刻 $i$ ($0 \le i \le n+1$) 使得两个配方中 $a_i$ 的值不同,则认为这两个配方是不同的。

输入格式

输入的第一行包含两个整数:$n$ 和 $k$ ($1 \le n \le 2 \cdot 10^5; 0 \le k \le 2 \cdot 10^5$)。

输出格式

输出可能的配方数量,对 $998\,244\,353$ 取模。

样例

输入 1

3 3

输出 1

31

输入 2

42 0

输出 2

1

输入 3

314 159

输出 3

734464844

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.