![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
NOIp_网络流
文章平均质量分 71
le0tan
Per Aspera Ad Astra
展开
-
【模板】网络流——Dinic
#include <cstdio> #include <vector> #include <cstring> #define maxn 1000 #define INF 0x3f using namespace std; /* 设在残量网络中节点u到源点s的距离为dist[u] 只保留每个点出发到dist+1的边(边(u,v)存在仅当dist[u]+1=dist[v]) */str原创 2016-11-11 14:42:49 · 304 阅读 · 0 评论 -
【NOIp复习】网络流笔记
基础流网络性质 容量限制:对所有的u,v∈V,要求f(u,v)<=c(u,v)。 反对称性:对所有的u,v∈V,要求f(u,v)=-f(v,u)。 流守恒性:对所有u∈V-{s,t},要求∑f(u,v)=0 (v∈V)。 残流网络在给定的流网络G=(V,E)中,设f为G中的一个流,并考察一对顶点u,v∈V,在不超过容量c(u,v)的条件下,从u到v之间可以压入的额外网络流量,就是(u,v)原创 2016-11-10 16:23:39 · 602 阅读 · 0 评论