From f44c2203cbc694cf9ef349a5210b85c4d1b88847 Mon Sep 17 00:00:00 2001 From: Panquesito7 Date: Fri, 10 Sep 2021 21:24:21 +0000 Subject: [PATCH] fix: Hopefully fix Ci errors --- graph/travelling_salesman_problem.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/graph/travelling_salesman_problem.cpp b/graph/travelling_salesman_problem.cpp index 73e16a0cf..796da5e55 100644 --- a/graph/travelling_salesman_problem.cpp +++ b/graph/travelling_salesman_problem.cpp @@ -22,7 +22,6 @@ #include /// for IO operations #include /// for limits of integral types #include /// header for std::vector -#define max_int 2147483647 /// define INT_MAX /** * @namespace graph @@ -50,14 +49,14 @@ int TravellingSalesmanProblem(std::vector> *cities, int src, } //// store minimum weight Hamiltonian Cycle. - int32_t min_path = max_int; + int32_t min_path = 2147483647; do { //// store current Path weight(cost) int32_t curr_weight = 0; //// compute current path weight int k = src; - for (auto i = 0U; i < vtx.size(); i++) { + for (uint64_t i = 0; i < vtx.size(); i++) { curr_weight += (*cities)[k][vtx[i]]; k = vtx[i]; }