Skip to content

Commit

Permalink
Fix HopcroftKarp again
Browse files Browse the repository at this point in the history
  • Loading branch information
OmeletWithoutEgg committed Apr 11, 2024
1 parent eb92e8c commit fac293d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion codes/FlowAndMatching/HopcroftKarp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ struct HK {
bool dfs(const auto &g, int x) {
for (int y : g[x]) if (r[y] == -1 ||
(d[r[y]] == d[x] + 1 && dfs(g, r[y])))
return l[x] = y, r[y] = x, true;
return l[x] = y, r[y] = x, d[x] = -1, true;
return d[x] = -1, false;
}
};

0 comments on commit fac293d

Please sign in to comment.