Skip to content

Commit d345d14

Browse files
committed
modify code
1 parent dc00cc4 commit d345d14

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/class47/Code03_DinicAlgorithm.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,9 @@ private int dfs(int s, int t, int r) {
9090
if (s == t || r == 0) {
9191
return r;
9292
}
93+
if (depth[s] >= depth[t]) {
94+
return 0;
95+
}
9396
int f = 0;
9497
int flow = 0;
9598
// s点从哪条边开始试 -> cur[s]

0 commit comments

Comments
 (0)