From 47479936e07a1d99849c9dfeb57de6d811ffbdc4 Mon Sep 17 00:00:00 2001 From: TriantaTV Date: Sun, 10 Sep 2023 22:11:18 -0500 Subject: [PATCH] Fixed cost --- src/algorithm.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/algorithm.cpp b/src/algorithm.cpp index f40977f..39cd76d 100644 --- a/src/algorithm.cpp +++ b/src/algorithm.cpp @@ -64,6 +64,7 @@ void PrintSolution(std::vector solution) { cost += j.weight; } } + lastVertex = i; } std::cout << std::endl; std::cout << "Cost: " << cost << std::endl;