AtCoder Grand Contest 060
翻译中…
Problem Statement
翻译中…
Find the number of pairs $(P,Q)=((P_1,P_2,\cdots,P_N),(Q_1,Q_2,\cdots,Q_N))$ of permutations of $(1,2,\cdots,N)$ that satisfy the following condition, modulo $998244353$.
翻译中…
- For every
$i$($1 \leq i \leq N-1$), one of the two conditions below holds. $P_i < P_{i+1}$and$Q_i < Q_{i+1}$.$P_i > P_{i+1}$and$Q_i > Q_{i+1}$.
翻译中…
Constraints
翻译中…
$2 \leq N \leq 2 \times 10^5$- All numbers in the input are integers.
翻译中…
Input
翻译中…
The input is given from Standard Input in the following format:
翻译中…
N
翻译中…
Output
翻译中…
Print the answer.
翻译中…
样例
Input #1
2
Output #1
2
Two pairs, $(P,Q)=((1,2),(1,2))$ and $(P,Q)=((2,1),(2,1))$, satisfy the condition.
Input #2
3
Output #2
10
Input #3
4
Output #3
88
Input #4
10
Output #4
286574791
题目信息
题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。