组合数我记得是这样求的,但是 WA 了,求问组合数到底怎么求。
inline int C(int n, int m) { if (n < m) return 0; return fac[n] * qmi(fac[n - m] * fac[m] % mod, mod - 2) % mod; }