
网络流
z听歌的小孩z
这个作者很懒,什么都没留下…
展开
-
P2756 飞行员配对方案问题(网络流or二分图)[网络流24题]
题目链接 二分图做法: #include<bits/stdc++.h> using namespace std; const int N = 105; vector<int>e[N]; int vis[N],cy[N],cx[N],n,m; int dfs(int u) { for(int i=0;i<e[u].size();++i){ int v=e[u...原创 2019-05-09 15:51:27 · 136 阅读 · 0 评论 -
POJ 3436 ACM Computer Factory (最大流+拆点建图+输出路径)
#include<cstdio> #include<cstring> #include<algorithm> using namespace std; const int maxn = 1e2+10; const int inf = 0x3f3f3f3f; int p,n,S,T,en=1,tot; int head[maxn],h[maxn],q[maxn]...原创 2019-05-09 15:53:58 · 172 阅读 · 0 评论 -
P1402 酒店之王(网络流拆点建图)
#include<bits/stdc++.h> using namespace std; const int N = 1100; const int inf = 0x3f3f3f3f; int n,p,q,S,T,tot; int en=1,head[N],h[N],Q[N]; struct edge{ int to,v,next; }e[N*10]; inline void i...原创 2019-05-10 15:02:42 · 133 阅读 · 0 评论