传送门:https://www.lydsy.com/JudgeOnline/problem.php?id=1485 [题解] Catalan数,注意不能直接用逆元,需要分解质因数. # include <bits/stdc++.h> using namespace std; , N = 2e6 + ; int isp[N]; int p[M], pn; int n, mod; int times[M]; inline int pwr(int a, int b) { ; while(b) { )…