AtCoder Beginner Contest 258
Ex
Odd Steps
AtCoder
⌀ 2708
原题
←G →
翻译中…

Problem Statement

翻译中…

Find the number, modulo $998244353$, of sequences $X$ that satisfy all of the following conditions.

翻译中…
  • Every term in $X$ is a positive odd number.
  • The sum of the terms in $X$ is $S$.
  • The prefix sums of $X$ contain none of $A_1, \dots, A_N$. Formally, if we define $Y_i = X_1 + \dots + X_i$ for each $i$, then $Y_i \neq A_j$ holds for all integers $i$ and $j$ such that $1 \leq i \leq |X|$ and $1 \leq j \leq N$.
翻译中…

Constraints

翻译中…
  • $1 \leq N \leq 10^5$
  • $1 \leq A_1 \lt A_2 \lt \dots \lt A_N \lt S \leq 10^{18}$
  • All values in input are integers.
翻译中…

Input

翻译中…

Input is given from Standard Input in the following format:

翻译中…

N S
A_1 \ldots A_N

翻译中…

Output

翻译中…

Print the answer.

翻译中…

样例

Input #1
3 7
2 4 5
Output #1
3
The following three sequences satisfy the conditions. - $(1, 5, 1)$ - $(3, 3, 1)$ - $(7)$
Input #2
5 60
10 20 30 40 50
Output #2
37634180
Input #3
10 1000000000000000000
1 2 4 8 16 32 64 128 256 512
Output #3
75326268
题目信息
题号
abc258_h
时间限制
3 s
内存限制
1024 MB

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