mirror of
https://github.com/bertptrs/adventofcode.git
synced 2025-12-26 13:20:32 +01:00
Implement day 03.
This commit is contained in:
@@ -31,9 +31,10 @@ namespace {
|
||||
assert(amount > 0 && "Must have some valid direction");
|
||||
|
||||
for (std::size_t i = 0; i < amount; ++i) {
|
||||
++steps;
|
||||
pos += dir;
|
||||
if (!points.count(pos)) {
|
||||
points[pos] = ++steps;
|
||||
points[pos] = steps;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user