From 13d6fb2553cbd8231277127efb619a161959a8b7 Mon Sep 17 00:00:00 2001 From: Clyne Sullivan Date: Fri, 9 Dec 2022 18:55:30 -0500 Subject: day9: cpp changes, add part2 basic --- day9/part2.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'day9/part2.cpp') diff --git a/day9/part2.cpp b/day9/part2.cpp index d6da81b..bb7fda2 100644 --- a/day9/part2.cpp +++ b/day9/part2.cpp @@ -46,9 +46,10 @@ int main() ty += hy > ty ? 1 : -1; } + } + if (std::find(locs.cbegin(), locs.cend(), knots.back()) == locs.cend()) locs.emplace_back(knots.back()); - } } } -- cgit v1.2.3