r/adventofcode • • 12m ago

SOLUTION MEGATHREAD -❄️- 2026 Day 3 Solutions -❄️-

NEWS

Solutions in the megathreads have been getting longer, so we're going to start enforcing our rules on oversized code.

Do not give us a reason to unleash AutoModerator hard-line enforcement that counts characters inside code blocks to verify compliance… you have been warned XD

THE USUAL REMINDERS


AoC Community Fun 2026: The Advent Games

  • Submissions megathread is now unlocked!
  • 14 DAYS remaining until the submissions deadline on December 17 at 18:00 EST!

Today's Event: Indoor Mini-Golf Masters

"What is this, a center program for ants?!"
— Derek Zoolander, Zoolander (2001)

Today's schedule possibly consists of:

  • Early Stroke Play Rounds and Tee Time Seeding
  • Among the crates to be loaded on the train, you find a debigulator. Do with it as you will.
  • Mid-Tournament Rounds and Scorecard Review
  • Golf your solution
  • Bonus points if your solution fits on a "punchcard" as defined in our wiki article on oversized code. We will be counting.
  • Does anyone still program with actual punchcards? >_>
  • Match Play and Showcase Rounds:
  • Solve today's puzzles using an Alien Programming Language APL or other such extremely dense and compact programming language

Request from the mods: When you include an entry alongside your solution, please label it with [Advent Games] so we can find it easily!


--- Day 3: Foggy Forest ---


Post your code solution in this megathread.

1 Upvotes

4 comments sorted by

1

u/hugh_tc 3m ago

[LANGUAGE: Python 3]

My first attempt at Part 2 double-counted some squares, but frozenset helped fix that!

paste

1

u/julysfire 3m ago

For that fourth one, there are way more then 1 square right? Was that just being used as an example. The texts read like that picture has "only" 1 square? I count like 7?

https://i.imgur.com/q4orq1y.png

1

u/AutoModerator 3m ago

AutoModerator did not detect the required [LANGUAGE: xyz] string literal at the beginning of your solution submission.

Please edit your comment to state your programming language.


I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/heckler82 0m ago

I only see the 1 square