diff options
| author | MZuenni <michi.zuendorf@gmail.com> | 2023-03-01 11:36:26 +0100 |
|---|---|---|
| committer | MZuenni <michi.zuendorf@gmail.com> | 2023-03-01 11:36:26 +0100 |
| commit | 12afe719ce268bb10aa93a910079a44eb08999b8 (patch) | |
| tree | 0937a117287eebe3942e0506d27143eff4980d09 /graph/TSP.cpp | |
| parent | ad8456f7c5d44d3c647b3a368050a5d2f39ae3c3 (diff) | |
removed trailing whitespaces and use more structured bindings
Diffstat (limited to 'graph/TSP.cpp')
| -rw-r--r-- | graph/TSP.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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]; |
