摘要: "推柿子" "第二类斯特林数的容斥表达" fft卡精度就用ntt吧qwq。 cpp include include using namespace std; typedef long long ll; int n, lim=1, limcnt, rev[300005], inv[300005], a 阅读全文
posted @ 2018-05-04 21:23 poorpool 阅读(102) 评论(0) 推荐(0) 编辑
摘要: 记横联通是一块横着的没有硬石头的地,把他们编号。竖联通同理。 对于一个空地,将其横联通编号和竖联通编号连边,二分图匹配,最大匹配为答案。 cpp include include include include using namespace std; int n, m, hr[55][55], sr 阅读全文
posted @ 2018-05-04 11:02 poorpool 阅读(137) 评论(0) 推荐(0) 编辑
摘要: 当年我还没学cdq的时候在luogu上写过树套树的代码orzzz "ref" cpp include include include using namespace std; int n, m, uu, vv, dp[100005], c[100005]; struct Node{ int val, 阅读全文
posted @ 2018-05-04 09:48 poorpool 阅读(150) 评论(0) 推荐(0) 编辑
摘要: 刚入门cdq分治(入了吗),再研究研究orz cpp include include include using namespace std; int n, opt, xu, yu, xv, yv, ans[10005], cnt, c[2000005]; struct Node{ int x, y 阅读全文
posted @ 2018-05-04 08:38 poorpool 阅读(162) 评论(0) 推荐(0) 编辑
摘要: 枚举 $k$,对于每个点 $i$ 我们最多删 $deg_i k$ 条边,就源点向第一部、第二部向汇点连边,容量是 $deg_i k$,原边连上,容量是 $1$,这样每流过一条原边在网络流图中的边时,就代表这条边可以删掉。也即没有流过的边就是 $k$ 时的答案 cpp include include 阅读全文
posted @ 2018-05-04 07:18 poorpool 阅读(234) 评论(0) 推荐(0) 编辑