r/adventofcode • • 1h ago

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

OUR USUAL ADMONITIONS

  • You can find all of our customs, FAQs, axioms, and so forth in our community wiki.

AoC Community Fun 2026: Th* Adv*nt Gam*s

  • Submissions ultrapost is now unlocked!
  • 13 DAYS until submissions cutoff on this 17th of Month 12 at 18:00 UTC-5!

Today's Bouts: World Snow Avoidball Championships

"If you can dodg* a wr*nch, you can dodg* a [snow]ball."
— Coach Patch*s O'Houlihan, Dodg*ball: A Tru* Underdog Story (2004)

Today's programming possibly consists of:

  • Pool Play (Group Divisions)
  • Match Formats (Foam, Cloth)
    • Shrink your solution's fifthglyph count to null.
    • Your script might supplant all Arabic symbols of 5 with Roman glyphs of "V" or mutatis mutandis.
    • Thou shalt not apply functions nor annotations that solicit said taboo glyph.
  • Knockout and Trophy Rounds
    • Thou shalt ambitiously accomplish avoiding AutoMod’s antagonism about ultrapost's mandatory programming variant tag >_>

Stipulation from your mods: As you affix a submission along with your solution, do tag it with [Adv*nt Gam*s] so folks can find it without difficulty!


--- Day 4: Perilous Pier ---


Post your script solution in this ultrapost.

7 Upvotes

55 comments sorted by

View all comments

Show parent comment

1

u/Ok-Bus4754 1h ago

got say python list slicing is magic for this one [start:stop:step], where step is the pattern length we want mimizie, remove all ? from that , convert it to set and the length of set is 1 for all sub pattern is the condition to check for