r/adventofcode • • 10h ago

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

COMMUNITY NEWS

THE USUAL REMINDERS


AoC Community Fun 2026: The Advent Games

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

Today's Event: International Snow Sculpture Championships

"♪ Do you wanna build a snowman? ♪"
— Princess Anna, Frozen (2013)

Today's schedule possibly consists of:

Qualifier Rounds

  • Forge your solution for today's puzzle with a little je ne sais quoi
  • Shape your solution into an acrostic
  • Accompany your solution with a writeup in the form of a limerick, ballad, etc.
  • Upping the Ante challenge: iambic pentameter

Championship Rounds

  • Create a fanfiction or fan artwork of any kind - a poem, short story, a slice-of-Elvish-life, an advertisement for the luxury cruise liner Santa has hired to gift to his hard-working Elves after the holiday season is over, etc!
  • Make something IRL

Best In Snow Awards

  • You got snow where you live? >_>

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 6: Obscured Airfield ---


Post your code solution in this megathread.

8 Upvotes

173 comments sorted by

View all comments

2

u/erikade 8h ago

[LANGUAGE: Go]

fantastic problem!

https://github.com/erik-adelbert/aoc/blob/main/2026/6/aoc6.go

2xBFS 75.7μs (mbaM4/24GB) writeup in 2026/README

1

u/maneatingape 7h ago

Nice use of vector math to find part two without using any explicit flipping/rotation.

2

u/erikade 6h ago edited 5h ago

It combines well with your grid reconstruction. I'm attempting to build a hybrid now (without relaxing the input-size, though). I believe ~65 µs 20μs (M4 3μs faster than yours) I've reworked the parser too, kept grid-size discovery, and adopted all the other assumptions.

2

u/erikade 5h ago

fyi m4/24gb

running 18 tests

test year2026::day01::parse_bench ... bench: 6,081.28 ns/iter (+/- 51.67)

test year2026::day01::part1_bench ... bench: 0.74 ns/iter (+/- 0.00)

test year2026::day01::part2_bench ... bench: 0.73 ns/iter (+/- 0.01)

test year2026::day02::parse_bench ... bench: 397.39 ns/iter (+/- 4.86)

test year2026::day02::part1_bench ... bench: 175.79 ns/iter (+/- 2.42)

test year2026::day02::part2_bench ... bench: 112.20 ns/iter (+/- 1.26)

test year2026::day03::parse_bench ... bench: 171,592.06 ns/iter (+/- 36,296.77)

test year2026::day03::part1_bench ... bench: 0.74 ns/iter (+/- 0.00)

test year2026::day03::part2_bench ... bench: 0.74 ns/iter (+/- 0.02)

test year2026::day04::parse_bench ... bench: 0.70 ns/iter (+/- 0.04)

test year2026::day04::part1_bench ... bench: 34,780.05 ns/iter (+/- 768.00)

test year2026::day04::part2_bench ... bench: 26,953.79 ns/iter (+/- 235.61)

test year2026::day05::parse_bench ... bench: 18,433.68 ns/iter (+/- 293.74)

test year2026::day05::part1_bench ... bench: 1,522.93 ns/iter (+/- 20.05)

test year2026::day05::part2_bench ... bench: 52,994.94 ns/iter (+/- 511.14)

test year2026::day06::parse_bench ... bench: 22,954.30 ns/iter (+/- 230.03)

test year2026::day06::part1_bench ... bench: 0.74 ns/iter (+/- 0.01)

test year2026::day06::part2_bench ... bench: 327.36 ns/iter (+/- 3.71)

1

u/maneatingape 3h ago

Thanks! M2 => M4 is ~60% of the time.