如果你 #1 WA
如果你的组合数写法是这样的:
ll C(ll n,ll m,ll p) { if(n<m) n+=p; return fac[n]*inv[m]%p*inv[n-m]%p; }
请查看你 init 函数中的循环范围,要是模数两倍
init