ACM-网络流
Sherlock_n
这个作者很懒,什么都没留下…
展开
-
最大网络流
首先是FF算法: #include #include #include #include using namespace std; const int MAX_V = 1100; struct edge{int to, cap, rev;}; ///邻接表表示,点,容量,反向边 vector G[MAX_V]; bool used[MAX_V]; /// 贪心策略: 1.找到f原创 2017-04-17 20:59:48 · 327 阅读 · 0 评论 -
二分图的匹配
方法一:利用网络流新增源点和汇点的方法 #include #include #include #include using namespace std; const int MAX_V = 1100; struct edge{int to, cap, rev;}; ///邻接表表示,点,容量,反向边 vector G[MAX_V]; bool used[MAX_V]; /// 贪心原创 2017-04-17 22:06:41 · 319 阅读 · 0 评论