#graph601. 最大流
最大流
Maximum Flow
Problem Description
Given vertices, directed edges, and the capacity of each edge, find the maximum flow from vertex to vertex .
Input Format
The first line contains four integers .
Each of the next lines contains three integers , describing a directed edge from to with capacity .
Output Format
Output the maximum flow from vertex to vertex .
Sample Input
7 14 1 7
1 2 5
1 3 6
1 4 5
2 3 2
2 5 3
3 2 2
3 4 3
3 5 3
3 6 7
4 6 5
5 6 1
6 5 1
5 7 8
6 7 7
Sample Output
14