![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
网络流
拂晓
Linux 网络编程
展开
-
poj 1087 a plug for unix
题目: A Plug for UNIX Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 10861 Accepted: 3562 Description You are in charge of setting up the press room for the inaugural meeting of the原创 2012-04-01 09:27:20 · 803 阅读 · 0 评论 -
POJ 2396 上下界可行流
Budget Time Limit: 3000MS Memory Limit: 65536K Total Submissions: 4378 Accepted: 1679 Special Judge Description We are supposed to make a budget proposal for this m原创 2012-08-22 09:44:59 · 465 阅读 · 0 评论 -
POJ 3084 最大流
Panic Room Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 1592 Accepted: 789 Description You are the lead programmer for the Securitron 9042, the latest and原创 2012-08-27 14:04:43 · 561 阅读 · 0 评论 -
ZOJ 3642
Just Another Information Sharing Problem Time 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 · 378 阅读 · 0 评论 -
POJ 3422 卡卡的矩阵之旅 最大费用流
Kaka's Matrix Travels Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 5806 Accepted: 2266 Description On an N × N chessboard with a non-negative number in原创 2012-08-22 09:43:23 · 1218 阅读 · 0 评论 -
POJ 2516 最小费用流
做的第一个最小费用流问题,第一次忘了费用乘以流量 WA了一次,每次输入一个矩阵都运行一次最小费用流即可。 #include #include #include #include using namespace std; #define INF 0x1f1f1f1f #define MIN(a,b) ((a) int store[60][60];//储量 i原创 2012-06-05 08:11:08 · 346 阅读 · 0 评论 -
POJ 1273 一般性预流推进
#include #include #include using 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 · 423 阅读 · 0 评论 -
poj 1273 Dinic
#include #include #include #include using 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 · 441 阅读 · 0 评论 -
poj 1273 Ford_fulkerson
第一个网络流题,虽水还是记念一下,因为忘了将反向边每次更新,无耻的贡献了N次WA~用的是算法导论上的第一个算法,比较慢的Ford_fulkerson,广搜找增广路,每次记录每个节点的前驱节点以到该节点路径中的最小流#include #include #include #include using namespace std; int flow[205][205]; int cap[205][20原创 2012-04-20 17:15:18 · 631 阅读 · 0 评论 -
POJ 2060 最小路径覆盖
题目: Taxi Cab Scheme Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 4432 Accepted: 1868 Description Running a taxi station is not all that simple. Apart from the obvious demand for原创 2012-03-31 19:54:19 · 709 阅读 · 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 · 436 阅读 · 0 评论