Source: Day 5: Cafeteria
Full solution for today (spoilers!).
Part 1
Given a list of ranges (inclusive) and a list of IDs, how many of the IDs are in any range?
Full solution for today (spoilers!).
Given a list of ranges (inclusive) and a list of IDs, how many of the IDs are in any range?
Full solution for today (spoilers!).
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? Sum3a + bfor each machine that has a solution.