摘要: poorpool 真名 chenyixiao。是一条傻逼题都不会做的没有脑子的咸鱼。 现就读于华中科技大学计算机科学与技术学院,曾为山西省临汾第一中学校选手,NOIP 2017&2018 一等奖,WC 2018 无奖,SXOI 2018 暴力进队,APIO 2018 铜牌,THUSC 2018 未进 阅读全文
posted @ 2018-01-15 21:57 poorpool 阅读(759) 评论(3) 推荐(0) 编辑
摘要: 安装就把根节点到它全设为 1 删除就把以它为根的子树全设为 0 记得 标记初始化为 1 ,因为标记是 0 的情况也是要处理的。 阅读全文
posted @ 2018-01-15 21:10 poorpool 阅读(126) 评论(0) 推荐(0) 编辑
摘要: 二分图匹配,一边是属性值,一边是武器 cpp include include include using namespace std; int n, lst[1010005], uu, vv, hea[10005], cnt, ans; bool vis[1010005]; struct Edge{ 阅读全文
posted @ 2018-01-15 18:21 poorpool 阅读(89) 评论(0) 推荐(0) 编辑
摘要: 参考 "这里" 我们先预处理模数在 $\sqrt{n}$ 以内的询问。 要是模数在 $\sqrt{n}$ 以外,直接暴力统计,反正这样的数又不会超过 $\sqrt{n}$ 个。 修改的时候也是。要是在 $\sqrt{n}$ 以内就把预处理的答案减去原数加上新数。 然后再把原数改掉。 然后再优化一下, 阅读全文
posted @ 2018-01-15 16:46 poorpool 阅读(121) 评论(0) 推荐(0) 编辑
摘要: 先做一遍普通的dinic 然后再更改源点为超级源,超级源向原源加一条capacity=k && cost=0的边,再加上有费用的边跑最小费用最大流 cpp include include include include using namespace std; int n, m, k, ss, tt 阅读全文
posted @ 2018-01-15 15:53 poorpool 阅读(113) 评论(0) 推荐(0) 编辑
摘要: 把每个点拆成 x y z 对于第 i 个点,x y是表示流入的,y z是表示流出的。 cpp include include include include using namespace std; int n, m, ss, tt, hea[1305], cnt, minCost, pre[130 阅读全文
posted @ 2018-01-15 11:04 poorpool 阅读(127) 评论(0) 推荐(0) 编辑