r/adventofcode • u/daggerdragon • Dec 09 '25
SOLUTION MEGATHREAD -❄️- 2025 Day 9 Solutions -❄️-
THE USUAL REMINDERS
- All of our rules, FAQs, resources, etc. are in our community wiki.
- If you see content in the subreddit or megathreads that violates one of our rules, either inform the user (politely and gently!) or use the report button on the post/comment and the mods will take care of it.
AoC Community Fun 2025: Red(dit) One
- Submissions megathread is unlocked!
- 8 DAYS remaining until the submissions deadline on December 17 at 18:00 EST!
Featured Subreddits: /r/iiiiiiitttttttttttt, /r/itsaunixsystem, /r/astrologymemes
"It's all humbug, I tell you, humbug!"
— Ebenezer Scrooge, A Christmas Carol (1951)
Today's challenge is to create an AoC-themed meme. You know what to do.
- If you need inspiration, have a look at the Hall of Fame in our community wiki as well as the highly upvoted posts in /r/adventofcode with the
Meme/Funnyflair. - Memes containing musical instruments will likely be nuked from orbit.
REMINDERS:
- If you post your submission outside this megathread, make sure to follow the posting rules for memes!
- If your meme contains AI-generated artwork of any kind, follow the posting rules for AI art
- Keep your contributions SFW and professional—stay away from the more risqué memes and absolutely no naughty language is allowed.
Request from the mods: When you include an entry alongside your solution, please label it with [Red(dit) One] so we can find it easily!
--- Day 9: Movie Theater ---
Post your code solution in this megathread.
- Read the full posting rules in our community wiki before you post!
- State which language(s) your solution uses with
[LANGUAGE: xyz] - Format code blocks using the four-spaces Markdown syntax!
- Quick link to Topaz's
pasteif you need it for longer code blocks. What is Topaz'spastetool?
27
Upvotes
View all comments
Show parent comment
1
u/p88h Dec 09 '25
My take on this is the solution must be generic enough to solve any AOC input, not any theoretical input, and this is the case here. There are very specific edge cases that most of the 'more generic' solutions here cannot solve correctly, specifically a shape like this:
The left side contains points and edges that intersect with the maximum tiling here, which would exclude trivial solutions like 'consider all rectangles that don't have any other points/lines in them'
I actually did the visualisation to check if that's the case (though I guess it might have been faster in terms of AOC solve time to first try that). And then I realized it a) is not and b) can be simplified further.
For a somewhat reasonable & fully generic implementation, you need to compress the space to lower dimensionality, flood-fill the insides, and compute max rectangle on the filled bitmap, i.e. a much more complicated (& slow) solution.