554C - Kyoya and Colored Balls 思路:组合数,用乘法逆元求. 代码: #include<bits/stdc++.h> using namespace std; #define ll long long #define pb push_back #define mem(a,b) memset(a,b,sizeof(a)) ; ; ]; ll fact[N]={}; ll qpow(ll n,ll k) { ll ans=; while(k) { )ans=(ans*…