adventofcode

2025-12-12T05:12:01.617989Z

Day 12 - Solutions

2025-12-12T05:13:19.281539Z

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.

Aleks 2025-12-12T06:06:57.891779Z

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

Aleks 2025-12-12T06:17:58.144009Z

Seems it's true for the other inputs as well. What's even funnier is that it doesn't work for the test input 😁

rjray 2025-12-12T07:33:13.765149Z

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.

genmeblog 2025-12-12T07:38:46.745349Z

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).

🎉 1
Aleks 2025-12-13T18:59:45.457669Z

@narimiran why's that?

AC 2025-12-13T23:08:50.176259Z

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!

narimiran 2025-12-14T05:20:26.363399Z

@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.

Aleks 2025-12-12T09:44:14.081999Z

someone on Reddit mentioned this lib https://pypi.org/project/polyomino/

narimiran 2025-12-12T15:58:03.440389Z

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.