#abc216h. H - Random Robots

H - Random Robots

Score : 600600 points

问题描述

在数轴上有 KK 个机器人。第 ii 个机器人(1iK1 \leq i \leq K)最初位于坐标 xix_i 处。

接下来,将精确进行 NN 次如下过程:

  • 每个机器人以概率 12\frac{1}{2} 独立选择移动或不移动。选择移动的机器人会 同时 向正方向移动距离 11,而其他机器人则保持静止。

此处,所有概率性决策都是独立的。

求在整个过程中,没有两个机器人相遇的概率,即在整个过程中任何时候都没有两个或更多机器人处于相同坐标的概率,结果对 998244353998244353 取模(参见注释)。

以上为通义千问 qwen-max 翻译,仅供参考。

Problem Statement

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

The following procedure is going to take place exactly NN times.

  • Each robot chooses to move or not with probability 12\frac{1}{2} each. The robots that move will simultaneously go the distance of 11 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 998244353998244353 (see Notes).

Notes

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 PQ\frac{P}{Q} using two coprime integers PP and QQ, it can be proved that there uniquely exists an integer RR such that R×QP(mod998244353)R \times Q \equiv P\pmod{998244353} and 0R<9982443530 \leq R \lt 998244353. Find this RR.

Constraints

  • 2K102 \leq K \leq 10
  • 1N10001 \leq N \leq 1000
  • 0x1<x2<<xK10000 \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:

KK NN

x1x_1 x2x_2 \ldots xKx_K

Output

Print the answer.

Sample Input 1

2 2
1 2

Sample Output 1

374341633

The probability in question is 58\frac{5}{8}.

We have 374341633×85(mod998244353)374341633 \times 8 \equiv 5\pmod{998244353}, so you should print 374341633374341633.

Sample Input 2

2 2
10 100

Sample Output 2

1

The probability in question may be 11.

Sample Input 3

10 832
73 160 221 340 447 574 720 742 782 970

Sample Output 3

553220346

update @ 2024/3/10 09:35:50