AtCoder Grand Contest 075
D
Max Prod Plus
AtCoder
⌀ 2627
原题
← CE →
翻译中…

Problem Statement

翻译中…

For a length-$N$ sequence of positive integers $A=(A_1,A_2,\dots,A_N)$, define $f(A)$ as follows:

翻译中…
  • The maximum value of $A_iA_j + A_k$ over all triples of integers $(i,j,k)$ satisfying $1 \le i < j < k \le N$.
翻译中…

Find the number, modulo $998244353$, of length-$N$ sequences $A$ of positive integers with all elements between $1$ and $M$, inclusive, such that $f(A) \le K$.

翻译中…

Constraints

翻译中…
  • $3 \le N \le 10^9$
  • $1 \le M,K \le 10^4$
翻译中…

Input

翻译中…

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

翻译中…

N M K

翻译中…

Output

翻译中…

Output the answer.

翻译中…

样例

Input #1
3 5 4
Output #1
9
The sequences satisfying the condition are $(1,1,1),(1,1,2),(1,2,1),(2,1,1),(1,1,3),(1,2,2),(2,1,2),(1,3,1),(3,1,1)$, which is nine sequences.
Input #2
4 5 7
Output #2
66
Input #3
123 456 789
Output #3
436486661
Input #4
1000000000 10000 10000
Output #4
855626126
题目信息
题号
agc075_d
时间限制
3 s
内存限制
1024 MB

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