Codeforces Round 250 (Div. 1)
E
The Child and Binary Tree
Codeforces
3100
原题
← D→
翻译中…

Our child likes computer science very much, especially he likes binary trees.

翻译中…

Consider the sequence of $*n*$ distinct positive integers: $*c*_{1}, *c*_{2}, ..., *c*_{*n*}$. The child calls a vertex-weighted rooted binary tree good if and only if for every vertex $*v*$, the weight of $*v*$ is in the set ${*c*_{1}, *c*_{2}, ..., *c*_{*n*}}$. Also our child thinks that the weight of a vertex-weighted tree is the sum of all vertices' weights.

翻译中…

Given an integer $*m*$, can you for all $*s*$ $(1 ≤ *s* ≤ *m*)$ calculate the number of good vertex-weighted rooted binary trees with weight $*s*$? Please, check the samples for better understanding what trees are considered different.

翻译中…

We only want to know the answer modulo $998244353$ ($7 × 17 × 2^{23} + 1$, a prime number).

翻译中…

Input

翻译中…

The first line contains two integers $*n*, *m*$ $(1 ≤ *n* ≤ 10^{5}; 1 ≤ *m* ≤ 10^{5})$. The second line contains $*n*$ space-separated pairwise distinct integers $*c*_{1}, *c*_{2}, ..., *c*_{*n*}$. $(1 ≤ *c*_{*i*} ≤ 10^{5})$.

翻译中…

Output

翻译中…

Print $*m*$ lines, each line containing a single integer. The $*i*$-th line must contain the number of good vertex-weighted rooted binary trees whose weight exactly equal to $*i*$. Print the answers modulo $998244353$ ($7 × 17 × 2^{23} + 1$, a prime number).

翻译中…

Note

翻译中…

In the first example, there are $9$ good vertex-weighted rooted binary trees whose weight exactly equal to $3$:

翻译中…

image

翻译中…

样例

Input #1
2 3
1 2
Output #1
1
3
9
InputCopy OutputCopy
Input #2
3 10
9 4 3
Output #2
0
0
1
1
0
2
4
2
6
15
InputCopy OutputCopy
Input #3
5 10
13 10 6 4 15
Output #3
0
0
0
1
0
1
0
2
0
5
InputCopy OutputCopy
题目信息
题号
438E
时间限制
7 s
内存限制
256 MB
标签
组合数学
分治
FFT
数论

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。