Skip to content

Commit 46993d1

Browse files
committed
Solve day 20 part 1
1 parent dfb3c9e commit 46993d1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

day20/src/day20.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ impl Racetrack {
8585
if !condition(node) {
8686
break;
8787
}
88+
println!("{node:?}");
8889
paths.push(node);
8990
}
9091

@@ -151,7 +152,7 @@ fn main() {
151152
let shortest_path = track.find_paths(start, end, CheatPolicy::Forbidden, |_| true)[0];
152153
let base_picos = shortest_path.picos;
153154

154-
let cheat_paths = track.find_paths(start, end, CheatPolicy::Allowed, |n| n.picos < base_picos);
155+
let cheat_paths = track.find_paths(start, end, CheatPolicy::Allowed, |n| n.picos <= base_picos - 100);
155156
let part1 = cheat_paths.len();
156157

157158
println!("Part 1: {part1}");

0 commit comments

Comments
 (0)