summaryrefslogtreecommitdiffstats
path: root/src/bin/2021/day23.rs
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2022-12-12 01:31:23 -0500
committerJesse Luehrs <doy@tozt.net>2022-12-12 01:31:23 -0500
commit229f1057468e6f7508ef36e804bc55af224b9fab (patch)
tree3f3e746ac02579292d09f982bc5b2bb578add57a /src/bin/2021/day23.rs
parent349ec2174dc890a5b7a8d47b5ca5d8c83fea1ec6 (diff)
downloadadvent-of-code-229f1057468e6f7508ef36e804bc55af224b9fab.tar.gz
advent-of-code-229f1057468e6f7508ef36e804bc55af224b9fab.zip
optimize day 12
Diffstat (limited to 'src/bin/2021/day23.rs')
-rw-r--r--src/bin/2021/day23.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/bin/2021/day23.rs b/src/bin/2021/day23.rs
index c86f7c0..7923361 100644
--- a/src/bin/2021/day23.rs
+++ b/src/bin/2021/day23.rs
@@ -1707,7 +1707,8 @@ pub fn parse(fh: File) -> Result<Burrow> {
}
pub fn part1(burrow: Burrow) -> Result<u64> {
- let (cost, _path) = Pathfinder.dijkstra(burrow, Burrow::done(false));
+ let (cost, _path) =
+ Pathfinder.dijkstra(burrow, |v| v == Burrow::done(false));
// for burrow in path {
// eprintln!("{}", burrow);
// }
@@ -1716,7 +1717,7 @@ pub fn part1(burrow: Burrow) -> Result<u64> {
pub fn part2(burrow: Burrow) -> Result<u64> {
let (cost, _path) =
- Pathfinder.dijkstra(burrow.to_big(), Burrow::done(true));
+ Pathfinder.dijkstra(burrow.to_big(), |v| v == Burrow::done(true));
// for burrow in path {
// eprintln!("{}", burrow);
// }