摘要: 题解: 其实就是一个拉格朗日反演+多项式全家桶。 拉格朗日反演:如果两个多项式f,g" role="presentation" style="position: relative;">f,gf,g满足g(f(x))=x" role="presentation" sty... 阅读全文
posted @ 2018-08-09 22:05 ez_2016gdgzoi471 阅读(240) 评论(0) 推荐(0) 编辑
摘要: 题解 Tips:我们会发现无论当前点是黑点还是白点,dp数组都是一样的。所以只用对其中一种情况dp就好了。#include#include#includeusing namespace std;const int N=1005,inf=0x3f3f3f3f;int n... 阅读全文
posted @ 2018-08-09 14:22 ez_2016gdgzoi471 阅读(233) 评论(0) 推荐(0) 编辑
摘要: 最小割的裸题。先拆点。之后暴力边可过,但更好的方法是每行每列建虚点,每片莲叶像所在行列互相连边。然后跑最大流就好。#include#include#include#include#include#includeusing namespace std;const int... 阅读全文
posted @ 2018-08-09 14:17 ez_2016gdgzoi471 阅读(209) 评论(0) 推荐(0) 编辑
摘要: 题解:二分答案+线段树优化连边+2-SAT。 二分答案mid,可以发现每个点要向连续的一段区间内的点连边,离散化后线段树优化连边即可。然后跑2-SAT判定是否有解。#include#include#include#include#includeusing namesp... 阅读全文
posted @ 2018-08-09 14:12 ez_2016gdgzoi471 阅读(174) 评论(0) 推荐(0) 编辑
摘要: 题解 dp时倒序计算,可以顺便get到前缀和,还是很妙的。#include#include#include#includeusing namespace std;const int mod=1000000007;int n,k,res,f[2005][2005];in... 阅读全文
posted @ 2018-08-09 14:08 ez_2016gdgzoi471 阅读(165) 评论(0) 推荐(0) 编辑