Day 12 - Solutions
Good luck and congratulations to everyone who made it all the way. I won't be able to get to these last few problems until next week.
Thanks, I just finished it! Maybe I got lucky, but a quick check was enough — I only verified that the total area of the region could fit all the shapes, and that already gave the right answer 🤩 https://github.com/zelark/AoC-2022/blob/master/src/zelark/aoc_2025/day_12.clj
Seems it's true for the other inputs as well. What's even funnier is that it doesn't work for the test input 😁
https://github.com/rjray/advent-2025-clojure/blob/master/src/advent_of_code/day12.clj I had the same thought and same experience-- simple math, but the algorithm didn't actually work on the test input.
haha, same here... but first I read some papers about 2d shape packing to find nice algorithm (https://scholarly.org/pdf/display/optimizing-allocation-of-two-dimensional-irregular-shapes-using-an-agent-based-approach).
@narimiran why's that?
I spent a day thinking about the problem.. then sat down and wrote some code that handled the test cases (albeit slowly for the third "failure" case). I figured I'd let it run on the real data while I made some coffee and think about how to prune more states. and surprise surprise, it was done before I had my first sip. ha!
@zelark Because the real input is constructed in such a way that it doesn't involve any thinking (unlike the test input in the task text). Basically, there's nothing to solve.
someone on Reddit mentioned this lib https://pypi.org/project/polyomino/
The most disappointing (to put it mildly) task this year. And maybe even in all 11 years. I don't mind easy tasks, I like them. But this one wasn't just easy, it was... bad.