{"problem":{"name":"Add Integer","description":{"content":"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_","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"arc212_f"},"statements":[{"statement_type":"Markdown","content":"You are given integers $N,M,X$.\nPerform the following series of operations to create a sequence $A$ of length $N$ consisting of non-negative integers.\n\n*   Freely decide an integer sequence $A=(A_1,A_2)$ of length $2$.\n*   Then, perform the following operation $N-2$ times on $A$.\n\n*   Let $k=|A|$. Let $x=A_{k-1}, y=A_k$. Append either $x+y$ or $y-x$ to the end of $A$.\n\nA sequence $A$ is a good sequence if and only if it satisfies the following:\n\n*   $0 \\le A_i \\le M \\ (1 \\le i \\le N)$\n*   $A_N=X$\n\nFind the sum, modulo $998244353$, of $A_1 \\times A_2$ over all good sequences that can be obtained by the operations.\n\n## Constraints\n\n*   $3 \\leq N \\leq 2 \\times 10^5$\n*   $1 \\leq X \\leq M \\leq 2 \\times 10^5$\n*   All input values are integers.\n\n## Input\n\nThe input is given from Standard Input in the following format:\n\n$N$ $M$ $X$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"arc212_f","tags":[],"sample_group":[["3 4 3","8\n\nSome possible sequences are $(0,3,3),(1,4,3),(2,1,3)$.\nThe sum of $A_1 \\times A_2$ over all possible sequences is $8$."],["150000 160000 140000","791841701"]],"created_at":"2026-03-03 11:01:13"}}