摘要: #无向图网络流 建图时直接把反向边的出事容量设为与正向边相同即可。 #最大权闭合子图 选出一个点集,使得它们的后继节点都在这个点集中,使这个点集尽可能地大。 解法: 源点向点权>=0的点连边,容量=点权。 源点向点权<0的点连边,容量=abs(点权)。 点权>=0的点向点权<=0的点连边,容量=in 阅读全文
posted @ 2018-12-07 21:33 Creed-qwq 阅读(152) 评论(0) 推荐(0) 编辑
摘要: 原题的话,由于保证了wi include include include include include include include include include define N 220000 define M 220000 define L 200000 define eps 1e 7 d 阅读全文
posted @ 2018-12-07 14:44 Creed-qwq 阅读(131) 评论(0) 推荐(0) 编辑