summaryrefslogtreecommitdiff
path: root/graph/TSP.cpp
diff options
context:
space:
mode:
authormzuenni <michi.zuendorf@gmail.com>2023-01-10 11:40:09 +0100
committermzuenni <michi.zuendorf@gmail.com>2023-01-10 11:40:09 +0100
commitfd1f2b36e95c03625297b7b8cba3b1a04a0cc0ed (patch)
treeb143619750b90fbfa45a98be9ea56904d1a7129d /graph/TSP.cpp
parent8faa84ca282d51e9ce4fef535e68325adabcebad (diff)
change whitespaces
Diffstat (limited to 'graph/TSP.cpp')
-rw-r--r--graph/TSP.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/graph/TSP.cpp b/graph/TSP.cpp
index 0f72766..856107f 100644
--- a/graph/TSP.cpp
+++ b/graph/TSP.cpp
@@ -12,7 +12,7 @@ void TSP() {
for (int g = 0; g < n; g++) {
if (g != c && !((1 << g) & v)) {
if ((dp[g][(v | (1 << g))].dist + dist[c][g]) <
- dp[c][v].dist) {
+ dp[c][v].dist) {
dp[c][v].dist =
dp[g][(v | (1 << g))].dist + dist[c][g];
dp[c][v].to = g;
@@ -22,7 +22,7 @@ void TSP() {
vector<int> tour; tour.push_back(0); int v = 0;
while (tour.back() != 0 || sz(tour) == 1)
tour.push_back(dp[tour.back()]
- [(v |= (1 << tour.back()))].to);
+ [(v |= (1 << tour.back()))].to);
// Enthält Knoten 0 zweimal. An erster und letzter Position.
// return tour;
}