{"problem":{"name":"Playlist","description":{"content":"Takahashi has a playlist with $N$ songs. Song $i$ $(1 \\leq i \\leq N)$ lasts $T_i$ seconds.   Takahashi has started random play of the playlist at time $0$. Random play repeats the following: choose on","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc323_e"},"statements":[{"statement_type":"Markdown","content":"Takahashi has a playlist with $N$ songs. Song $i$ $(1 \\leq i \\leq N)$ lasts $T_i$ seconds.  \nTakahashi has started random play of the playlist at time $0$.\nRandom play repeats the following: choose one song from the $N$ songs with equal probability and play that song to the end. Here, songs are played continuously: once a song ends, the next chosen song starts immediately. The same song can be chosen consecutively.\nFind the probability that song $1$ is being played $(X + 0.5)$ seconds after time $0$, modulo $998244353$.\nHow to print a probability modulo $998244353$It can be proved that the probability to be found in this problem is always a rational number. Also, the constraints of this problem guarantee that when the probability to be found is expressed as an irreducible fraction $\\frac{y}{x}$, $x$ is not divisible by $998244353$.\nThen, there is a unique integer $z$ between $0$ and $998244352$, inclusive, such that $xz \\equiv y \\pmod{998244353}$. Report this $z$.\n\n## Constraints\n\n*   $2 \\leq N\\leq 10^3$\n*   $0 \\leq X\\leq 10^4$\n*   $1 \\leq T_i\\leq 10^4$\n*   All input values are integers.\n\n## Input\n\nThe input is given from Standard Input in the following format:\n\n$N$ $X$\n$T_1$ $T_2$ $\\ldots$ $T_N$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"abc323_e","tags":[],"sample_group":[["3 6\n3 5 6","369720131\n\nSong $1$ will be playing $6.5$ seconds after time $0$ if songs are played in one of the following orders.\n\n*   Song $1$ $\\to$ Song $1$ $\\to$ Song $1$\n*   Song $2$ $\\to$ Song $1$\n*   Song $3$ $\\to$ Song $1$\n\nThe probability that one of these occurs is $\\frac{7}{27}$.  \nWe have $369720131\\times 27\\equiv 7 \\pmod{998244353}$, so you should print $369720131$."],["5 0\n1 2 1 2 1","598946612\n\n$0.5$ seconds after time $0$, the first song to be played is still playing, so the sought probability is $\\frac{1}{5}$.  \nNote that different songs may have the same length."],["5 10000\n1 2 3 4 5","586965467"]],"created_at":"2026-03-03 11:01:14"}}