Codeforces Round 745 (Div. 1)
F
Problems for Codeforces
Codeforces
3300
原题
← E→
翻译中…

XYMXYM and CQXYM will prepare $n$ problems for Codeforces. The difficulty of the problem $i$ will be an integer $a_i$, where $a_i \geq 0$. The difficulty of the problems must satisfy $a_i+a_{i+1} \lt m$ ($1 \leq i \lt n$), and $a_1+a_n \lt m$, where $m$ is a fixed integer. XYMXYM wants to know how many plans of the difficulty of the problems there are modulo $998\,244\,353$.

翻译中…

Two plans of difficulty $a$ and $b$ are different only if there is an integer $i$ ($1 \leq i \leq n$) satisfying $a_i \neq b_i$.

翻译中…

Input

翻译中…

A single line contains two integers $n$ and $m$ ($2 \leq n \leq 50\,000$, $1 \leq m \leq 10^9$).

翻译中…

Output

翻译中…

Print a single integer — the number of different plans.

翻译中…

Note

翻译中…

In the first test case, the valid $a$ are: $[0,0,0]$, $[0,0,1]$, $[0,1,0]$, $[1,0,0]$.

翻译中…

$[1,0,1]$ is invalid since $a_1+a_n \geq m$.

翻译中…

样例

Input #1
3 2
Output #1
4
InputCopy OutputCopy
Input #2
5 9
Output #2
8105
InputCopy OutputCopy
Input #3
21038 3942834
Output #3
338529212
InputCopy OutputCopy
题目信息
题号
1580F
时间限制
8 s
内存限制
256 MB
标签
组合数学
FFT
数学

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