mirror of
https://github.com/bertptrs/adventofcode.git
synced 2025-12-25 21:00:31 +01:00
Wrong output variable.
This commit is contained in:
@@ -25,7 +25,7 @@ void aoc2019::day01_part2(std::istream &input, std::ostream &output) {
|
|||||||
for (auto drift : drifts) {
|
for (auto drift : drifts) {
|
||||||
cur += drift;
|
cur += drift;
|
||||||
if (seen.count(cur) == 1) {
|
if (seen.count(cur) == 1) {
|
||||||
output << drift << std::endl;
|
output << cur << std::endl;
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
seen.insert(cur);
|
seen.insert(cur);
|
||||||
|
|||||||
Reference in New Issue
Block a user