摘要: 裸费用流,要注意的是当天供应的东西不一定要从仓库里拿,所以S限制的容量应该是i'-(i+1)的 数据那么弱,暴力或许过得去? 1 #include<bits/stdc++.h> 2 #define inc(i,l,r) for(int i=l;i<=r;i++) 3 #define dec(i,l, 阅读全文
posted @ 2016-01-31 23:16 onlyRP 阅读(158) 评论(0) 推荐(0) 编辑
摘要: 很明显是最大权封闭子图(noi挺喜欢考?),但直接跑最小割的话处理不了不能打到的plant,所以要先拓扑排序简化下图 (重建图挺烦。。) 1 #include<bits/stdc++.h> 2 #define inc(i,l,r) for(int i=l;i<=r;i++) 3 #define de 阅读全文
posted @ 2016-01-31 16:00 onlyRP 阅读(121) 评论(0) 推荐(0) 编辑
摘要: 感觉总是无视拓扑排序也不太好,就来了2道模板题。。不造哪个时候又给忘了。。 codevs 1833 1 #include<bits/stdc++.h> 2 #define inc(i,l,r) for(int i=l;i<=r;i++) 3 #define dec(i,l,r) for(int i= 阅读全文
posted @ 2016-01-31 14:32 onlyRP 阅读(114) 评论(0) 推荐(0) 编辑