摘要:
题目传送 做法 对于每个人,inc为x,pref为y;对于每道菜,p和s为x,b为y 于是根据题意有$$p[i] include include include include define rep(i, a, b) for (int i = a; i void read(T &x) { x = 0 阅读全文
摘要:
pi只有0~5000且只找最小的没出现的,又要找不同club的,考虑二分匹配,左边pi,右边ci,一个匹配一个。离线倒着加边即可。 阅读全文
摘要:
题目传送 推公式博客传送 推完式子就是去朴素地求就行了Orz C++ const int maxn = 1e5 + 5; const int mod = 1e9 + 7; int m, mu[maxn], vis[maxn], primes[maxn], tot; ll dp[maxn]; vect 阅读全文