JP's Blog

  • GitHub * Flickr * Resume
  • Reviews
  • Programming
  • Home Automation
  • Photography
  • Maker
  • Writing
  • Research
  • Search
  • RSS

AoC 2024 Day 13: Cramerinator

2024-12-13

Source: Day 13: Claw Contraption

Full solution for today (spoilers!).

  • Source: Day 13: Claw Contraption
  • Part 1
    • Optimization 1: Cramer’s Rule
  • Part 2
  • Benchmarks
  • Optimization 2: Really going off the deep end

Part 1

Given Button A (ax, ay), Button B (bx, by), and Prize (px, py); how many times must you press Button A (a) and Button B (b) to reach the Prize? Sum 3a + b for each machine that has a solution.

read more...

  • All posts: By Date
  • All posts: By Tag
  • RSS: All
  • RSS: programming/topics

All posts unless otherwise mentioned are licensed under Creative Commons License

Any source code unless otherwise mentioned is licensed under the 3 clause BSD license