From 12afe719ce268bb10aa93a910079a44eb08999b8 Mon Sep 17 00:00:00 2001 From: MZuenni Date: Wed, 1 Mar 2023 11:36:26 +0100 Subject: removed trailing whitespaces and use more structured bindings --- graph/TSP.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'graph/TSP.cpp') diff --git a/graph/TSP.cpp b/graph/TSP.cpp index 856107f..e0fced6 100644 --- a/graph/TSP.cpp +++ b/graph/TSP.cpp @@ -9,9 +9,9 @@ void TSP() { for (int v = m - 2; v >= 0; v--) { for (int c = n - 1; c >= 0; c--) { - for (int g = 0; g < n; g++) { + for (int g = 0; g < n; g++) { if (g != c && !((1 << g) & v)) { - if ((dp[g][(v | (1 << g))].dist + dist[c][g]) < + if ((dp[g][(v | (1 << g))].dist + dist[c][g]) < dp[c][v].dist) { dp[c][v].dist = dp[g][(v | (1 << g))].dist + dist[c][g]; -- cgit v1.2.3