![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
网络流
touso
这个作者很懒,什么都没留下…
展开
-
Farm Tour 最小费用最大流
最小费用最大流先说一下我个人的理解,首先以费用为权的有向图寻求最短路,在这条最短路上运送最大的货物,即尽可能大的流,当一条边的流已经等于其最大容量时,这条边就相当于没有了,此时只剩下反向流,然后重复这步操作,每次寻找费用最短路,在这条最短路上寻找最大流,当找不到最短路时,即找到最小费用最大流。When FJ’s friends visit him on the farm, he likes t...原创 2020-04-13 22:09:02 · 879 阅读 · 0 评论 -
PIGS网络流
链接题意:有n个猪圈,每个猪圈都有一定数量的猪,有m名顾客,他们想买一些猪圈的猪并且有确定的购买猪的数量#include<stdio.h>#include<string.h>#include<queue>#include<string>#include<algorithm>using namespace std;const int maxn=2e5+10;int mapp[110][110],vis[maxn];int r[ma原创 2020-10-02 21:10:58 · 132 阅读 · 0 评论