标签:des style blog http color os io strong
Drainage Ditches
Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u
Description
Input
Output
Sample Input
5 4 1 2 40 1 4 20 2 4 20 2 3 30 3 4 10
Sample Output
50思路:单源单汇最大流问题,这次用到了残余网络,每次找到一条增广路,min里存的是所有相连边的最小值,不是这条增广路上的最小值,然后此条增广路
上的每条边减去最小值,再重新开始找增广路,重复执行以上操作,直到没有增广路为止。
poj1273 Drainage Ditches(裸最大流),布布扣,bubuko.com
poj1273 Drainage Ditches(裸最大流)
标签:des style blog http color os io strong
原文地址:http://www.cnblogs.com/6bing/p/3928340.html