#P4141. 消失之物
消失之物
Description
ftiasch has items with volumes . Due to her negligence, the -th item is missing.
“How many ways are there to exactly fill a knapsack of capacity using the remaining items?” — this is a classic problem.
She records the answer as and wants the table of for all and .

Input Format
The first line contains two integers , the number of items and the maximum capacity.
The second line contains integers , the volume of each item.
Output Format
Output an matrix, giving the last digit of .
3 2
1 1 2
11
11
21
Hint
Constraints
For of the testdata, , and .
Sample explanation
If item is missing, there is exactly one way to fill capacity , namely choosing items and .
—
: Added five new hack test sets.
Translated by ChatGPT 5
京公网安备 11011102002149号