![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
网络流
sprite_
这个作者很懒,什么都没留下…
展开
-
hdu3549Flow Problem(最大流 模板题)
题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=3549 网络流最大流模板题。 #include #include #include #define rep(i,a,b) for(int i=a;i<=b;i++) #define inf 0x3f3f3f3f #define MM 10005 using namespace std; //原创 2016-07-22 20:08:27 · 446 阅读 · 0 评论 -
poj2195 Going Home(最大费用最小流)
题目链接: http://poj.org/problem?id=2195 求最大流最小费用。主要是加边, 先从源点到各个人m,费用为0流量为1,。 然后从m到H,费用为距离,流量为1. 最后从H到汇点,费用为0,流量为1. 代码: #include #include #include #include #include #define inf 0x3f3f3f3f #define原创 2016-07-22 20:12:35 · 345 阅读 · 0 评论