Day 12, puzzle 2
This commit is contained in:
@ -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
9
src/bin/d12p2.rs
Normal 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);
|
||||
}
|
||||
Reference in New Issue
Block a user