最大流
文章平均质量分 75
Drenight
Dream in the night.
展开
-
Dining POJ - 3281 EK网络流模板/最大流/拆点
//#include#include#include#include#include#include#includeusing namespace std;#define ll long long#define pb push_backconst int maxn=500;const int inf=0x3f3f3f3f;struct Edge{ int from,t原创 2017-06-05 16:25:53 · 349 阅读 · 0 评论 -
Dinic模板
#includeusing namespace std;#define ll long longconst int maxn=3e5;const int INF=0x3f3f3f3f;struct Edge{ int u,v,cap,flow;};struct Dinic{ int n,m,s,t; vectoredges;原创 2017-07-02 23:34:22 · 194 阅读 · 0 评论 -
ISAP模板
#includeusing namespace std;#define ll long longconst int maxn=2e5+7;const int inf=0x3f3f3f3f;int num_nodes,num_edges;int tot;int d[maxn],cur[maxn],source,sink;int p[maxn],num[maxn],vis[maxn]原创 2017-07-04 18:15:51 · 282 阅读 · 0 评论