blob: 4cc388d1c97f9b59ddcf5b205d08f30d3fd22be6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#include "aoc.h"
#include <algorithm>
namespace aoc2022 {
std::pair<int, int> day12(line_view file) {
int row{0};
heightmap hm;
per_line(file, [&hm, &row](line_view lv){
hm.load(row++, lv);
return true;
});
// hm.print();
std::vector<int> steps;
hm.find(hm.end, steps);
for(auto& i : steps) {
printf("%d\n", i);
}
return {0, 0};
}
}
|