![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
最大流
h_lizeming
这个作者很懒,什么都没留下…
展开
-
Escape HDU - 3605(最大流)
M - Escape 2012 If this is the end of the world how to do? I do not know how. But now scientists have found that some stars, who can live, but some people do not fit to live some of the planet. Now s...原创 2018-08-09 08:36:58 · 140 阅读 · 0 评论 -
G - Island Transport (最大流模板题)
In the vast waters far far away, there are many islands. People are living on the islands, and all the transport among the islands relies on the ships. You have a transportation company there. Some...原创 2018-08-09 08:44:36 · 316 阅读 · 0 评论 -
F - Power Network POJ - 1459
#include <stdio.h> #include <string.h> #include <queue> using namespace std; const int N = 105; const int inf = 0x3f3f3f3f; int g[N][N]; int flow[N][N]; int p[N]; ...原创 2018-08-09 08:45:44 · 149 阅读 · 0 评论 -
G - Island Transport
读题 给定一个无向图,求从最左侧的点到最右侧的点的最大流。 解题 无向图的最大流与有向图的最大流的区别在于反向边的流量不是零而是与正向边相等。注意这点之后,再打一个Dinic算法模板。考虑到数据特别地大,需要进行当前弧优化。即在每一次找增广路前进行: while(bfs()) { for(int i=1;i<=N;i++) cur[i...原创 2018-08-09 08:56:57 · 245 阅读 · 0 评论 -
HDU4292 Food(结点容量模型+多源多汇模型)
题目链接 http://poj.org/problem?id=3281 题目 Cows are such finicky eaters. Each cow has a preference for certain foods and drinks, and she will consume no others. Farmer John has cooked fabulous meals f...原创 2018-08-06 09:52:10 · 198 阅读 · 0 评论 -
A - ACM计算机工厂 POJ - 3436
就是EK建图 #include<stdio.h> #include<iostream> #include<string.h> #include<algorithm> #include<queue> using namespace std; const int MAXN=110; const int INF=0x3fffffff; in...原创 2018-08-06 09:39:13 · 170 阅读 · 0 评论