摘要: //题目类型:最大流(多源点、多汇点)构图简单题 //解题思路:分别添加超级源点和超级汇点,使用ISAP算法实现,另外本题的输入与输出也应该特别学习 #include <iostream>#include <queue>//#include <conio.h>using namespace std;#define arraysize 205int maxData... 阅读全文
posted @ 2010-05-26 22:33 北海小龙 阅读(580) 评论(0) 推荐(0) 编辑
摘要: 关于此算法的介绍可参看此为牛人的博客:http://www.icycandy.com/blog/template-of-broaden-the-shortest-path-algorithm/comment-page-1另外在《算法艺术与信息学竞赛》中也有详细的解释。 阅读全文
posted @ 2010-05-26 22:13 北海小龙 阅读(463) 评论(0) 推荐(0) 编辑
摘要: #include <iostream>#include <queue>#define msize 1024 //最大顶点数目using namespace std;int d[msize]; //标号int r[msize][msize]; //残留网络,初始为原图int num[msize]; //num[i]表示标号为i的顶点数有多少int pre[msize]; //... 阅读全文
posted @ 2010-05-26 22:07 北海小龙 阅读(613) 评论(0) 推荐(0) 编辑