Score : $600$ points
Takahashi won a claw machine competition and was awarded "all-you-can-stuff" gold blocks.
There are unlimited numbers of blocks weighing $w_1, w_2, \dots, w_K$ kilograms each, and an unlimited number of bags weighing $1$ kilogram each to stuff them.
Takahashi can bring home one non-empty bag.
A bag can contain zero or more other non-empty bags and zero or more gold blocks.
After arranging a truck with a load capacity of $W$ kilograms, he gets interested in the number of ways to stuff gold blocks and bring home a bag that weighs $w$ kilograms in total for $w = 2, 3, \dots, W$.
Find the number, modulo $998244353$, of possible states of the bag for each $w = 2, 3, \dots, W$. Here,
Input is given from Standard Input in the following format:
$W$ $K$ $w_1$ $w_2$ $\dots$ $w_K$
Print the answer in $W - 1$ lines.
The $i$-th line should contain the count for $w = i + 1$.
4 1 1
1 2 4
The figure below enumerates the possible states of the bag for $w = 2, 3, 4$. (A circle represents a bag.)
10 10 1 2 3 4 5 6 7 8 9 10
1 3 7 18 45 121 325 904 2546