diff options
Diffstat (limited to 'src/2022/day12/aoc.cpp')
-rw-r--r-- | src/2022/day12/aoc.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/2022/day12/aoc.cpp b/src/2022/day12/aoc.cpp index c0d1db5..7b79e94 100644 --- a/src/2022/day12/aoc.cpp +++ b/src/2022/day12/aoc.cpp @@ -11,13 +11,14 @@ std::pair<int, int> day12(line_view file) { return true; }); - hm.print(); - std::vector<int> paths; - hm.was(hm.start) += 1; - hm.find(0, hm.start, paths); + // hm.print(); + std::vector<heightmap::pos> ps; + hm.find_prev(0, hm.end, ps); - std::sort(paths.begin(), paths.end()); - return {paths[0], 0}; + for (auto &p : ps) { + printf("%d %d\n", p.x, p.y); + } + return {0, 0}; } } |