Skip to content

Commit

Permalink
day20
Browse files Browse the repository at this point in the history
  • Loading branch information
vslinko committed Dec 20, 2024
1 parent 22a4375 commit ef81f67
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/day20.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,7 @@ macro_rules! iterate_path {

macro_rules! calculate_cheating_jumps {
($distances:expr, $initial_total_time:expr, $pos:expr, $jumps:expr) => {{
let time_to_end = *$distances.get_unchecked($pos);
let time_before_cheating = $initial_total_time - time_to_end;

let time_before_cheating = $initial_total_time - *$distances.get_unchecked($pos);
let pos_x = ($pos % LINE_LENGTH) as isize;
let pos_y = ($pos / LINE_LENGTH) as isize;

Expand Down

0 comments on commit ef81f67

Please sign in to comment.