//fac[i]=i!,inv[i]=1/i! long long fac[maxn],inv[maxn]; long long C(int x,int y) { if(!y) return 1; long long u = C(x / modd, y / modd),z; int v = x % modd, w = y % modd; if (v < w) z = 0; else z = (fac[v] * inv[w] % modd) * inv[v - w] % modd; return u * z % modd; } //预处理 fac[0]=1...