随笔分类 -  数学——容斥和计数

摘要:"ref" 总的来说,就是 1. 容斥转化为点对应到点集问题。 2. 树形 dp 解决转化后的问题。 cpp include include include include using namespace std; typedef long long ll; int n, m, hea[19], c 阅读全文
posted @ 2018-05-23 20:03 poorpool 阅读(133) 评论(0) 推荐(0)
摘要:"orz" cpp include include using namespace std; typedef long long ll; int n, m, k, C[105][105], u[105], r[105], g[105]; const int mod=1e9+7; int ksm(in 阅读全文
posted @ 2018-04-19 13:58 poorpool 阅读(301) 评论(0) 推荐(0)
摘要:容斥搞出 gcd 不是 $1$ 的四元组个数。 "参考" cpp include include include using namespace std; typedef long long ll; int n, cnt[10005], num[10005], uu, fac[35], din; l 阅读全文
posted @ 2018-03-13 18:54 poorpool 阅读(103) 评论(0) 推荐(0)