Skip to content

Commit

Permalink
[2023] Day 24: 'solve' part B
Browse files Browse the repository at this point in the history
By solve, I mean write a mathmatica command to stdout. That counts, right?
  • Loading branch information
connorslade committed Dec 24, 2023
1 parent 51dec13 commit 543d7d8
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions aoc_2023/src/day_24.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,17 @@ impl Solution for Day24 {
}

fn part_b(&self, input: &str) -> Answer {
let stones = parse(input);

// just pipe it into mathematica :')
// Solve[{ ... }]
for (i, stone) in stones.into_iter().enumerate().take(3) {
print!("{} + {} * t{i} == x + vx * t{i}, ", stone.pos.x(), stone.vel.x());
print!("{} + {} * t{i} == y + vy * t{i}, ", stone.pos.y(), stone.vel.y());
print!("{} + {} * t{i} == z + vz * t{i}, ", stone.pos.z(), stone.vel.z());
}
println!();

Answer::Unimplemented
}
}
Expand Down

0 comments on commit 543d7d8

Please sign in to comment.