Update graph/dinic.cc
Signed-off-by: subcrip <contact@subc.rip>
This commit is contained in:
parent
75823a421e
commit
92bc4771a8
|
@ -4,7 +4,7 @@ struct dinic {
|
||||||
ll cap;
|
ll cap;
|
||||||
ll flow;
|
ll flow;
|
||||||
int rev;
|
int rev;
|
||||||
bool mark;
|
int mark;
|
||||||
};
|
};
|
||||||
|
|
||||||
vector<vector<edge>> edges;
|
vector<vector<edge>> edges;
|
||||||
|
@ -13,7 +13,7 @@ struct dinic {
|
||||||
|
|
||||||
dinic(int n) : edges(n + 1), layer(n + 1), vis(n + 1) {}
|
dinic(int n) : edges(n + 1), layer(n + 1), vis(n + 1) {}
|
||||||
|
|
||||||
void add_edge(int from, int to, ll cap, bool mark = false) {
|
void add_edge(int from, int to, ll cap, int mark = false) {
|
||||||
edges[from].push_back({ to, cap, 0, int(edges[to].size()), mark });
|
edges[from].push_back({ to, cap, 0, int(edges[to].size()), mark });
|
||||||
edges[to].push_back({ from, 0, 0, int(edges[from].size() - 1), mark });
|
edges[to].push_back({ from, 0, 0, int(edges[from].size() - 1), mark });
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue