Codeforces Round 698 (Div. 1)
F
Nezzar and Chocolate Bars
Codeforces
3500
原题
← E→
翻译中…

Nezzar buys his favorite snack — $n$ chocolate bars with lengths $l_1,l_2,\ldots,l_n$. However, chocolate bars might be too long to store them properly!

翻译中…

In order to solve this problem, Nezzar designs an interesting process to divide them into small pieces. Firstly, Nezzar puts all his chocolate bars into a black box. Then, he will perform the following operation repeatedly until the maximum length over all chocolate bars does not exceed $k$.

翻译中…
  • Nezzar picks a chocolate bar from the box with probability proportional to its length $x$.
  • After step $1$, Nezzar uniformly picks a real number $r \in (0,x)$ and divides the chosen chocolate bar into two chocolate bars with lengths $r$ and $x-r$.
  • Lastly, he puts those two new chocolate bars into the black box.
翻译中…

Nezzar now wonders, what is the expected number of operations he will perform to divide his chocolate bars into small pieces.

翻译中…

It can be shown that the answer can be represented as $\frac{P}{Q}$, where $P$ and $Q$ are coprime integers and $Q \not \equiv 0$ ($\bmod 998\,244\,353$). Print the value of $P\cdot Q^{-1} \mod 998\,244\,353$.

翻译中…

Input

翻译中…

The first line contains two integers $n$ and $k$ ($1 \le n \le 50, 1 \le k \le 2000$).

翻译中…

The second line contains $n$ integers $l_1, l_2, \ldots, l_n$ ($1 \le l_i$, $\sum_{i=1}^{n} l_i \le 2000$).

翻译中…

Output

翻译中…

Print a single integer — the expected number of operations Nezzar will perform to divide his chocolate bars into small pieces modulo $998\,244\,353$.

翻译中…

样例

Input #1
1 1
2
Output #1
4
InputCopy OutputCopy
Input #2
1 1
1
Output #2
0
InputCopy OutputCopy
Input #3
1 5
1234
Output #3
15630811
InputCopy OutputCopy
Input #4
2 1
2 3
Output #4
476014684
InputCopy OutputCopy
Input #5
10 33
10 20 30 40 50 60 70 80 90 100
Output #5
675105648
InputCopy OutputCopy
题目信息
题号
1477F
时间限制
5 s
内存限制
512 MB
标签
组合数学
FFT
数学
概率论

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