Score : 1000 points
Problem Statement
Find the number of pairs (P,Q)=((P1,P2,⋯,PN),(Q1,Q2,⋯,QN)) of permutations of (1,2,⋯,N) that satisfy the following condition, modulo 998244353.
- For every i (1≤i≤N−1), one of the two conditions below holds.- Pi<Pi+1 and Qi<Qi+1.
- Pi>Pi+1 and Qi>Qi+1.
- Pi<Pi+1 and Qi<Qi+1.
- Pi>Pi+1 and Qi>Qi+1.
Constraints
- 2≤N≤2×105
- All numbers in the input are integers.
The input is given from Standard Input in the following format:
N
Output
Print the answer.
2
2
Two pairs, (P,Q)=((1,2),(1,2)) and (P,Q)=((2,1),(2,1)), satisfy the condition.
3
10
4
88
10
286574791