Day 12, puzzle 2

This commit is contained in:
jazzpi
2022-12-15 22:47:17 +01:00
parent 3bdd5472aa
commit 36ceda33db
3 changed files with 19 additions and 14 deletions

View File

@ -3,7 +3,7 @@ use aoc22::{day12, util};
pub fn main() {
let heightmap = day12::parse_heightmap(&util::parse_input());
let dist = day12::path_steps(&heightmap).expect("No path found!?");
let dist = day12::path_steps(&heightmap, false).expect("No path found!?");
println!("Distance to target is {}", dist);
}

9
src/bin/d12p2.rs Normal file
View File

@ -0,0 +1,9 @@
use aoc22::{day12, util};
pub fn main() {
let heightmap = day12::parse_heightmap(&util::parse_input());
let dist = day12::path_steps(&heightmap, true).expect("No path found!?");
println!("Distance to target is {}", dist);
}