From 2ddde5ab9f596c0a4f344703ec58e72651122594 Mon Sep 17 00:00:00 2001 From: Bruno Freitas Tissei <bft15@inf.ufpr.br> Date: Thu, 6 Jun 2019 16:46:35 -0300 Subject: [PATCH] Add status for MCMF Signed-off-by: Bruno Freitas Tissei <bft15@inf.ufpr.br> --- algorithms/graph/min_cost_max_flow.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/algorithms/graph/min_cost_max_flow.cpp b/algorithms/graph/min_cost_max_flow.cpp index ff37950..60092b1 100644 --- a/algorithms/graph/min_cost_max_flow.cpp +++ b/algorithms/graph/min_cost_max_flow.cpp @@ -2,17 +2,18 @@ /// /// Time: O(V^2 * E) /// Space: O(V + E) +/// +/// Status: Tested (UVA10594,kattis/mincostmaxflow) struct MinCostMaxFlow { struct Edge { int u, v, cap, cost; }; - int N; vector<Edge> edges; vector<vector<int>> adj; vector<int> vis, dist, par, ind; MinCostMaxFlow(int N) : - N(N), vis(N), dist(N), par(N), ind(N), adj(N) {} + vis(N), dist(N), par(N), ind(N), adj(N) {} void add_edge(int u, int v, int cap, int cost) { adj[u].pb(edges.size()); -- GitLab