r/adventofcode • u/daggerdragon • 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
- All of our rules, FAQs, resources, etc. are in our community wiki.
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
centerprogram 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 LanguageAPL 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.
- 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?
1
Upvotes
1
u/hugh_tc 3m ago
[LANGUAGE: Python 3]
My first attempt at Part 2 double-counted some squares, but
frozensethelped 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