
模板
aGoshawk
生命不息,奋斗不止!
展开
-
最大流Dinic模板
#includeusing namespace std;const int maxn=650;const int INF=0x3f3f3f3f;struct Edge{ int from,to,cap,flow;};struct Dinic{ int n,m,s,t; vectoredges; vectorG[maxn]; bool vis[ma原创 2015-07-17 19:02:17 · 921 阅读 · 0 评论 -
最大流ISAP模板
#includeusing namespace std;struct Edge{ int from,to,cap,flow;};const int maxn=650;const int INF=0x3f3f3f3f;struct ISAP{ int n,m,s,t;//结点数,边数(包括反向弧),源点编号,汇点编号 vectoredges; vector原创 2015-07-18 13:35:31 · 737 阅读 · 0 评论