AtCoder Beginner Contest 216
H
Random Robots
AtCoder
⌀ 3295
原题
← G→
翻译中…

Problem Statement

翻译中…

There are $K$ robots on a number line. The $i$-th robot $(1 \leq i \leq K)$ is initially at the coordinate $x_i$.

翻译中…

The following procedure is going to take place exactly $N$ times.

翻译中…
  • Each robot chooses to move or not with probability $\frac{1}{2}$ each. The robots that move will simultaneously go the distance of $1$ in the positive direction, and the other robots will remain still.
翻译中…

Here, all probabilistic decisions are independent.

翻译中…

Find the probability that no two robots meet, that is, there are never two or more robots at the same coordinate at the same time throughout the procedures, modulo $998244353$ (see Notes).

翻译中…

Note

翻译中…

It can be proved that the probability in question is always a rational number. Additionally, under the Constraints in this problem, when that value is represented as $\frac{P}{Q}$ using two coprime integers $P$ and $Q$, it can be proved that there uniquely exists an integer $R$ such that $R \times Q \equiv P\pmod{998244353}$ and $0 \leq R \lt 998244353$. Find this $R$.

翻译中…

Constraints

翻译中…
  • $2 \leq K \leq 10$
  • $1 \leq N \leq 1000$
  • $0 \leq x_1 \lt x_2 \lt \cdots \lt x_K \leq 1000$
  • All values in input are integers.
翻译中…

Input

翻译中…

Input is given from Standard Input in the following format:

翻译中…

K N
x_1 x_2 \ldots x_K

翻译中…

Output

翻译中…

Print the answer.

翻译中…

样例

Input #1
2 2
1 2
Output #1
374341633
The probability in question is $\frac{5}{8}$. We have $374341633 \times 8 \equiv 5\pmod{998244353}$, so you should print $374341633$.
Input #2
2 2
10 100
Output #2
1
The probability in question may be $1$.
Input #3
10 832
73 160 221 340 447 574 720 742 782 970
Output #3
553220346
题目信息
题号
abc216_h
时间限制
2 s
内存限制
1024 MB

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