AtCoder Regular Contest 212 (Div. 2)
F
Add Integer
AtCoder
⌀ 2735
原题
← E→
翻译中…

Problem Statement

翻译中…

You are given integers $N,M,X$.

翻译中…

Perform the following series of operations to create a sequence $A$ of length $N$ consisting of non-negative integers.

翻译中…
  • Freely decide an integer sequence $A=(A_1,A_2)$ of length $2$.
  • Then, perform the following operation $N-2$ times on $A$.
翻译中…

A sequence $A$ is a good sequence if and only if it satisfies the following:

翻译中…
  • $0 \le A_i \le M \ (1 \le i \le N)$
  • $A_N=X$
翻译中…

Find the sum, modulo $998244353$, of $A_1 \times A_2$ over all good sequences that can be obtained by the operations.

翻译中…

Constraints

翻译中…
  • $3 \leq N \leq 2 \times 10^5$
  • $1 \leq X \leq M \leq 2 \times 10^5$
  • All input values are integers.
翻译中…

Input

翻译中…

The input is given from Standard Input in the following format:

翻译中…

N M X

翻译中…

Output

翻译中…

Output the answer.

翻译中…

样例

Input #1
3 4 3
Output #1
8
Some possible sequences are $(0,3,3),(1,4,3),(2,1,3)$. The sum of $A_1 \times A_2$ over all possible sequences is $8$.
Input #2
150000 160000 140000
Output #2
791841701
题目信息
题号
arc212_f
时间限制
2 s
内存限制
1024 MB

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