diff options
author | kaiwu <kaiwu2004@gmail.com> | 2022-12-13 18:01:35 +0800 |
---|---|---|
committer | kaiwu <kaiwu2004@gmail.com> | 2022-12-13 18:01:35 +0800 |
commit | dfd96e51c36f30a633ca9deb7be51628d85ac056 (patch) | |
tree | 589b5588af795b6a191c4d0dcbd846b5eb173134 /src/2022/day12/aoc.cpp | |
parent | f4a140d4bd7d0a7c2d39c7c266bf2a596f7df49c (diff) | |
download | advent-of-code-dfd96e51c36f30a633ca9deb7be51628d85ac056.tar.gz advent-of-code-dfd96e51c36f30a633ca9deb7be51628d85ac056.zip |
2022 day12 bfs
Diffstat (limited to 'src/2022/day12/aoc.cpp')
-rw-r--r-- | src/2022/day12/aoc.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/2022/day12/aoc.cpp b/src/2022/day12/aoc.cpp index 7b79e94..4cc388d 100644 --- a/src/2022/day12/aoc.cpp +++ b/src/2022/day12/aoc.cpp @@ -12,11 +12,11 @@ std::pair<int, int> day12(line_view file) { }); // hm.print(); - std::vector<heightmap::pos> ps; - hm.find_prev(0, hm.end, ps); + std::vector<int> steps; + hm.find(hm.end, steps); - for (auto &p : ps) { - printf("%d %d\n", p.x, p.y); + for(auto& i : steps) { + printf("%d\n", i); } return {0, 0}; } |