1
vote
Day 2: Fulminating Farmland
Today's problem description: https://adventofcode.com/2026/day/2
Please post your solutions in your own top-level comment. Here's a template you can copy-paste into your comment to format it nicely, with the code collapsed by default inside an expandable section with syntax highlighting (you can replace python with any of the "short names" listed in this page of supported languages):
<details>
<summary>Part 1</summary>
```python
Your code here.
```
</details>
Took some time to clean this up a bit before posting it, though it could probably still stand to be made more succinct. I used the waypoint characters directly when solving this initially, but that made part 2 especially kind of ugly. Instead, I now convert the waypoints to integers (from 0 to 5), which as a bonus allows part 1 to be done more efficiently. Part 2 is handled by keeping track of how many of each waypoint remain, and repeatedly selecting the most optimal waypoint that's still available.
Solution (Lily)