remove dist assignment

This commit is contained in:
onyx-and-iris 2023-12-11 19:41:32 +00:00
parent 23be028cd3
commit 8e70c5565f
2 changed files with 2 additions and 4 deletions

View File

@ -64,9 +64,8 @@ func one(lines []string) int {
continue
}
dist := shortestRoute(galaxies[i].coords, galaxies[j].coords, 2)
compared = append(compared, []int{galaxies[i].identifier, galaxies[j].identifier})
sum += dist
sum += shortestRoute(galaxies[i].coords, galaxies[j].coords, 2)
}
}

View File

@ -10,9 +10,8 @@ func two(lines []string) int {
continue
}
dist := shortestRoute(galaxies[i].coords, galaxies[j].coords, 1000000)
compared = append(compared, []int{galaxies[i].identifier, galaxies[j].identifier})
sum += dist
sum += shortestRoute(galaxies[i].coords, galaxies[j].coords, 1000000)
}
}