04 2018 档案

摘要:FFT HDU 5452 Minimum Cut 和[POJ 3417] Network这道题差不多。 LCA + 树上差分。 统计每个节点和它父亲相连的边被覆盖的次数,那切割了这条边形成最小割,还需要切割被覆盖次数条副边。 求最小值即可。 #include <cstdio> #include <c 阅读全文
posted @ 2018-04-25 16:49 卷珠帘 阅读(151) 评论(0) 推荐(0) 编辑
摘要:[POJ 3417] Network LCA + 树上差分 #include <cstdio> #include <cstring> #include <algorithm> using namespace std; const int maxn = 1e5+50; typedef long lon 阅读全文
posted @ 2018-04-17 16:20 卷珠帘 阅读(167) 评论(0) 推荐(0) 编辑
摘要:CodeForces 608C Chain Reaction #include <bits/stdc++.h> using namespace std; const int maxn = 1e6 + 50; int cov[100010]; ///覆盖个数 int sum[maxn]; struct 阅读全文
posted @ 2018-04-11 09:17 卷珠帘 阅读(181) 评论(0) 推荐(0) 编辑
摘要:FFT学习参考这两篇博客,很详细,结合这看,互补。 博客一 博客二 很大一部分题目需要构造多项式相乘来进行计数问题。 1. HDU 1402 A * B Problem Plus 把A和B分别当作多项式的系数。 #include <cstdio> #include <algorithm> #incl 阅读全文
posted @ 2018-04-04 09:22 卷珠帘 阅读(1402) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示