Universal Cup Judging System

Universal Cup

時間限制: 15 s 記憶體限制: 1024 MB 總分: 100 可 Hack ✓
统计

小 Misha 想要改变他的智商(初始智商为 0)。他在网上找到了 $m$ 种课程。第 $i$ 种课程花费 $c_i$ 比特币,使他的智商改变 $d_i$($d_i$ 可以为负,即课程结束后智商可能会下降),并且第 $i$ 种课程有 $n_i$ 门不同的课程。课程作者想要赚钱,因此满足 $c_i \ge |d_i|$。

Misha 想要达到至少 $k$ 的智商(当然,$k$ 也可以是负数)。为了实现他的目标,他每天会上一门课,直到某一天为止。同一门课程可以多次修读,且每次修读都会影响 Misha 的智商。

现在,他有 $n$ 个比特币。他想知道:对于每个 $1 \le t \le n$,他有多少种方式恰好花费 $t$ 个比特币并最终达到至少 $k$ 的智商?如果两种方式在学习天数上不同,或者在某一天修读的课程不同,则视为不同(同种类型的不同课程也被视为不同)。

输入格式

第一行包含一个整数 $m$ ($0 < m < 100$):课程类型的数量。 接下来的 $m$ 行,每行包含三个整数 $c_i, d_i, n_i$ ($0 < c_i < 10, |d_i| \le c_i, 0 \le n_i \le 10^4$)。 最后一行包含两个整数 $n$ 和 $k$ ($|k| \le n \le 3 \cdot 10^4, n > 0$)。

输出格式

输出 $n$ 个整数,每个整数占一行。第 $i$ 行的数字应为恰好花费 $i$ 个比特币并获得至少 $k$ 智商的方式数量。由于这些数字可能很大,请将结果对 $998\,244\,353$ 取模。

样例

样例输入 1

1
1 1 2
5 2

样例输出 1

0
4
8
16
32

样例输入 2

2
1 -1 1
1 1 2
4 2

样例输出 2

0
4
8
48

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.