网络流
拂晓
Linux 网络编程
展开
-
poj 1087 a plug for unix
题目:A Plug for UNIXTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 10861 Accepted: 3562DescriptionYou are in charge of setting up the press room for the inaugural meeting of the原创 2012-04-01 09:27:20 · 824 阅读 · 0 评论 -
POJ 2396 上下界可行流
BudgetTime Limit: 3000MS Memory Limit: 65536KTotal Submissions: 4378 Accepted: 1679 Special JudgeDescriptionWe are supposed to make a budget proposal for this m原创 2012-08-22 09:44:59 · 491 阅读 · 0 评论 -
POJ 3084 最大流
Panic RoomTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 1592 Accepted: 789DescriptionYou are the lead programmer for the Securitron 9042, the latest and原创 2012-08-27 14:04:43 · 582 阅读 · 0 评论 -
ZOJ 3642
Just Another Information Sharing ProblemTime Limit: 2 Seconds Memory Limit: 65536 KB There is going to be another test in the kindergarten. Again the teacher has already told every kid原创 2012-08-28 18:40:00 · 401 阅读 · 0 评论 -
POJ 3422 卡卡的矩阵之旅 最大费用流
Kaka's Matrix TravelsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 5806 Accepted: 2266DescriptionOn an N × N chessboard with a non-negative number in原创 2012-08-22 09:43:23 · 1239 阅读 · 0 评论 -
POJ 2516 最小费用流
做的第一个最小费用流问题,第一次忘了费用乘以流量 WA了一次,每次输入一个矩阵都运行一次最小费用流即可。 #include#include#include#includeusing namespace std; #define INF 0x1f1f1f1f#define MIN(a,b) ((a) int store[60][60];//储量i原创 2012-06-05 08:11:08 · 365 阅读 · 0 评论 -
POJ 1273 一般性预流推进
#include#include#includeusing namespace std;#define MIN(a,b) (a)<(b)?(a):(b)int m,n;int flow[202][202];int cap[202][202];int e[202];int h[202];void fun(){ //Init memset(flow,0,sizeof(f原创 2012-04-28 20:07:51 · 447 阅读 · 0 评论 -
poj 1273 Dinic
#include#include#include#includeusing namespace std;#define MIN(a,b) (a)<(b)?(a):(b)int flow[205][205];int cap[205][205];int lev_net[205][205];int mx[205];bool fl[205];int m,n;int res;原创 2012-04-26 11:40:26 · 461 阅读 · 0 评论 -
poj 1273 Ford_fulkerson
第一个网络流题,虽水还是记念一下,因为忘了将反向边每次更新,无耻的贡献了N次WA~用的是算法导论上的第一个算法,比较慢的Ford_fulkerson,广搜找增广路,每次记录每个节点的前驱节点以到该节点路径中的最小流#include#include#include#includeusing namespace std;int flow[205][205];int cap[205][20原创 2012-04-20 17:15:18 · 655 阅读 · 0 评论 -
POJ 2060 最小路径覆盖
题目:Taxi Cab SchemeTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 4432 Accepted: 1868DescriptionRunning a taxi station is not all that simple. Apart from the obvious demand for原创 2012-03-31 19:54:19 · 723 阅读 · 0 评论 -
Ford-furkson
int flow[205][205];int cap[205][205];int m,n;//m表示边数,n表示点数,均从1开始int ford_furkerson(){ int ret=0; bool fl[205]; int pre[205]; int ft[205]; while(1) { memset(fl,0,sizeof(fl)); memset(p原创 2012-04-21 23:55:00 · 455 阅读 · 0 评论