diff options
author | Clyne Sullivan <clyne@bitgloo.com> | 2022-12-09 18:55:30 -0500 |
---|---|---|
committer | Clyne Sullivan <clyne@bitgloo.com> | 2022-12-09 18:55:30 -0500 |
commit | 13d6fb2553cbd8231277127efb619a161959a8b7 (patch) | |
tree | 2f2320beda62389ffec24fdeee1d6fe29f852063 /day9/part2.cpp | |
parent | 5f7e61056af044daa9389fc7612724371e394b83 (diff) |
day9: cpp changes, add part2 basic
Diffstat (limited to 'day9/part2.cpp')
-rw-r--r-- | day9/part2.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
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()); - } } } |