摘要: 有多个发电站 中转站 和用户 多源 多汇的最大流问题 建立源点 和 汇点 将发电站连到源点上将用户连到汇点上求图的最大流#include<iostream>#include<queue>#include<stdio.h>#include<cstring>using namespace std;#define INF 0x7fffffffint cap[503][503],a[503],p[503];int ek(int s,int t,int n){ int f=0; while(1) { queue<int> q; memset(a 阅读全文
posted @ 2011-07-26 22:50 Crazy_yiner 阅读(138) 评论(0) 推荐(0) 编辑