Skip to content

Commit ecbea68

Browse files
authored
Merge pull request NASU41#47 from suisen-cp/maxflow
NASU41#46 MaxFlow が停止しないバグの修正
2 parents 4b3a043 + 694ffe6 commit ecbea68

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎MaxFlow/MaxFlow.java‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ public long flow(int s, int t, long flowLimit) {
9898
long d = dinicDFS(t, s, flowLimit - flow, iter, level);
9999
if (d <= 0) break;
100100
flow += d;
101+
if (flow == flowLimit) return flow;
101102
}
102103
}
103104
}

0 commit comments

Comments
 (0)