EK算法解决POJ 1459
摘要:
POJ 1459http://poj.org/problem?id=1459题意:给几个发电站,给几个消耗站,再给几个转发点。发电站只发电,消耗站只消耗电,转发点只是转发电,再给各个传送线的传电能力。问你消耗站能获得的最多电是多少。//方法如下: //虚拟出源点0和汇点n+1; 将所有的源点与0相连,将所有的汇点和n+1相连 #include <iostream>#include <cstring>using namespace std;const int inf = 100000000;const int maxN = 105;int n, np, nc, m, l[ 阅读全文
posted @ 2011-11-18 22:07 More study needed. 阅读(394) 评论(0) 推荐(0) 编辑