aboutsummaryrefslogtreecommitdiff
path: root/src/2022/day12/aoc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/2022/day12/aoc.cpp')
-rw-r--r--src/2022/day12/aoc.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/2022/day12/aoc.cpp b/src/2022/day12/aoc.cpp
index 34913e2..2cebc3c 100644
--- a/src/2022/day12/aoc.cpp
+++ b/src/2022/day12/aoc.cpp
@@ -11,8 +11,14 @@ std::pair<int, int> day12(line_view file) {
return true;
});
hm.flood(hm.start);
+ int a1 = hm.was(hm.end);
- return {hm.was(hm.end), 0};
+ hm.reset();
+ // hm.print();
+ int a2{INT32_MAX};
+ hm.flood_down(hm.end, &a2);
+
+ return {a1, a2};
}
}