Skip to content

Commit 641d3d5

Browse files
committed
Fix some bugs
1 parent e267148 commit 641d3d5

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/graph/edmonds_karp.cc

+6-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
* Edmonds-Karp algorithm
33
*/
44

5+
#include <queue>
6+
#include <vector>
7+
8+
using namespace std;
9+
510
const int MAX_V = 111;
611
const int INF = 1 << 30;
712

@@ -14,7 +19,7 @@ void augment(int v, int min_edge) {
1419
else if (parent[v] != -1) {
1520
augment(parent[v], min(min_edge, graph[parent[v]][v]));
1621
graph[parent[v]][v] -= f;
17-
graph[v][p[v]] += f;
22+
graph[v][parent[v]] += f;
1823
}
1924
}
2025

0 commit comments

Comments
 (0)