{"problem":{"name":"Bullion","description":{"content":"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 numbe","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":8000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc230_h"},"statements":[{"statement_type":"Markdown","content":"Takahashi won a claw machine competition and was awarded \"all-you-can-stuff\" gold blocks.  \nThere 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.\nTakahashi can bring home one non-empty bag.  \nA bag can contain zero or more other non-empty bags and zero or more gold blocks.\nAfter 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$.  \nFind the number, modulo $998244353$, of possible states of the bag for each $w = 2, 3, \\dots, W$. Here,\n\n*   two gold blocks are said to be the same when their weights are the same;\n*   two bags are said to be in the same state when the two multisets whose elements are the bags and gold blocks in the two bags are the same.\n\n## Constraints\n\n*   $2 \\leq W \\leq 2.5 \\times 10^5$\n*   $1 \\leq K \\leq W$\n*   $1 \\leq w_i \\leq W$ $(1 \\leq i \\leq K)$\n*   $i \\neq j \\to w_i \\neq w_j$ $(1 \\leq i,j \\leq K)$\n*   All values in input are integers.\n\n## Input\n\nInput is given from Standard Input in the following format:\n\n$W$ $K$\n$w_1$ $w_2$ $\\dots$ $w_K$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"abc230_h","tags":[],"sample_group":[["4 1\n1","1\n2\n4\n\nThe figure below enumerates the possible states of the bag for $w = 2, 3, 4$. (A circle represents a bag.)\n![image](https://img.atcoder.jp/ghi/5e1a4298e8b0992c767932915c7e93f4.png)"],["10 10\n1 2 3 4 5 6 7 8 9 10","1\n3\n7\n18\n45\n121\n325\n904\n2546"]],"created_at":"2026-03-03 11:01:13"}}