MCPcopy Create free account
hub / github.com/SuprDewd/CompetitiveProgramming / compute_max_flow

Function compute_max_flow

code/graph/gomory_hu_tree.cpp:28–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26 mn = min(mn, par[cur].second), cur = par[cur].first; } }
27 return make_pair(par, cap); }
28int compute_max_flow(int s, int t, const pair<vii, vvi> &gh) {
29 int cur = INF, at = s;
30 while (gh.second[at][t] == -1)
31 cur = min(cur, gh.first[at].second),
32 at = gh.first[at].first;
33 return min(cur, gh.second[at][t]); }
34// vim: cc=60 ts=2 sts=2 sw=2:

Callers 1

testFunction · 0.85

Calls

no outgoing calls

Tested by 1

testFunction · 0.68