Skip to content

Commit a01dbf8

Browse files
committed
just another comment
1 parent ee95755 commit a01dbf8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

2024/day_20/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ fn find_cheats(uv_points:&[((isize, isize), usize)], cheat_length: usize, min_sa
1818
left += 1;
1919
}
2020
for &((u_next, v_next), end_dist) in &uv_points[left..right+1] {
21-
let cheat = max(v.abs_diff(v_next), u.abs_diff(u_next));
21+
let cheat = max(v.abs_diff(v_next), u.abs_diff(u_next)); // manhattan distance between the two points
2222

2323
if cheat <= cheat_length // don't go through too many walls
2424
&& start_dist + cheat < end_dist // the cheat is actually an improvement

0 commit comments

Comments
 (0)