P4389 Princess Fu's Backpack

Background

Princess Fu has a cute backpack qwq.

Description

This backpack can hold a total size of at most $10^5$. Princess Fu has $n$ types of goods and she is about to set up a stall. Each type has volume $v_i$, and there are infinitely many pieces available. Given $m$, for $s \in [1,m]$, please answer the number of ways to fill exactly volume $s$ using these goods.

Input Format

The first line contains two positive integers $n, m$. The second line contains $n$ positive integers, representing the volume of each type of good.

Output Format

Output $m$ lines, where the $i$-th line represents the number of ways when $s = i$, taken modulo $998244353$.

Explanation/Hint

Constraints For 30% of the testdata, $1 \le n, m \le 3000$. For 60% of the testdata, purely randomly generated. For 100% of the testdata, $1 \le n, m \le 10^5$, $1 \le v_i \le m$. Translated by ChatGPT 5