From 1a032dd1d261cbbdf73e07104bab08bef3828ac6 Mon Sep 17 00:00:00 2001 From: Tommy Chiang Date: Tue, 3 Oct 2023 18:45:04 +0800 Subject: [PATCH] Minify Dinic (w/o test) --- codes/Matching_and_Flow/Dinic.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codes/Matching_and_Flow/Dinic.cpp b/codes/Matching_and_Flow/Dinic.cpp index 4fb4009c..3af62098 100644 --- a/codes/Matching_and_Flow/Dinic.cpp +++ b/codes/Matching_and_Flow/Dinic.cpp @@ -38,7 +38,7 @@ template class Dinic { st = st_, ed = ed_; Cap ret = 0, f; while (BFS()) { idx.assign(n, 0); - f = DFS(st, numeric_limits::max()); ret += f; + ret += (f = DFS(st, numeric_limits::max())); if (f == 0) break; } return ret;