#agc060d. [agc060_d]Same Descent Set

[agc060_d]Same Descent Set

计算有多少个 1n1 \dots n 的排列对 (A,B)(A,B) 满足 (Ai+1Ai)(Bi+1Bi)>0(A_{i+1}-A_i)(B_{i+1}-B_i) > 0 对于每一个 1i<n1\leq i < n 都成立。

2n2×1052\leq n\leq 2\times 10 ^ 5