网络流
文章平均质量分 65
Fistice
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
hihoCoder 1394 : 网络流四·最小路径覆盖 (网络流学习#4 记录)
题目链接:http://hihocoder.com/problemset/problem/1394 代码:#includeusing namespace std;const int N=505*2+10,M=20005,INF=0x3f3f3f3f;int n,m;int c[N][N],pre[N];int s,t;int bfs(){原创 2016-10-13 21:32:06 · 333 阅读 · 0 评论 -
hihoCoder 1393 网络流三·二分图多重匹配 (网络流学习#3 记录)
题目链接:http://hihocoder.com/problemset/problem/1393 话说我之前一直不知道二分匹配可以用网络流做。。。#include#include#includeusing namespace std;const int N=205;struct ss{int v,c,nxt;} e[N*20];int head原创 2016-10-13 21:32:04 · 397 阅读 · 0 评论 -
hihoCoder 1378 网络流二·最大流最小割定理 (网络流学习#2 记录)
题目链接:http://hihocoder.com/problemset/problem/1378 代码:#includeusing namespace std;const int maxn=505;int c[maxn][maxn],pre[maxn],flow[maxn][maxn],INF=0x3f3f3f3f,n,vis[maxn]={0},flag=0,n原创 2016-10-13 21:32:01 · 443 阅读 · 0 评论 -
hihoCoder 1369 网络流一·Ford-Fulkerson算法 (网络流学习#1 记录)
题目链接:http://hihocoder.com/problemset/problem/1369代码:#include#include#include#include#include#define INF 0x3f3f3f3fusing namespace std;int mp[505][506]={0};bool visit[506];int原创 2016-10-13 21:31:58 · 364 阅读 · 0 评论 -
HDU 3549 Flow Problem
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3549题意:给出一个图,1源点,N汇点,求最大流。 分析:最大流模板题。 代码:#include<bits/stdc++.h>using namespace std;const int N=20,M=1005,INF=0x3f3f3f3f;int c[N][N],dis[N],s,t;int原创 2016-10-14 18:30:44 · 293 阅读 · 0 评论 -
HDU 3572 Task Schedule
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3572 题意:给出n个任务,m个机器,第i个任务需要在一台机器上工作pi时间才能完成,而且必须要在给定的si-ei时间内完成。问是否可以完成全部任务。 分析:主要是建图。建立一个超级原点s和超级汇点t,在s与第i个任务间建立容量为pi的边,在第i个任务和si~ei的所有时间点建立容量为1的边,然后在所原创 2016-10-14 22:47:46 · 451 阅读 · 0 评论
分享