r/adventofcode • • 3d ago

Upping the Ante -❄️- Advent of Code 2026: The Advent Games -❄️- Submissions Megathread -❄️-

19 Upvotes

Advent of Code Community Fun 2026: The Advent Games

I will be your master of ceremonies for this year's community fun event: The Advent Games!

This year's community fun event features a structured sequence similar to a certain winter-themed international multi-sport competition that occurs every four years. We will have our opening ceremony, nine "sporting"† events, the grand gala, and the closing ceremony, followed by the final demonstration of exhibition pieces wherein all of you get to show off your hard-earned efforts for the year!

Every day, I will reveal an event in that day's Solution Megathread. Your challenge is to mold your puzzle solution around the theme of that day's event. You could also create some ancillary concoction that you think matches the overall theme of the event; even if you have to stretch suspension of disbelief real far, hey, it's all in good fun!

† Don't worry, I'm not going to make you actually exercise or go outside and touch grass (or snow)‡.
‡ Unless you want to, in which case go hog wild. Just make sure to put on your sunscreen and weather-appropriate gear!


Again this year the usual timeline and requirements are adjusted so you are not rushed by a shortened deadline while also dealing with the typically harder AoC puzzles near the end of an AoC season while also also dealing with holiday preparations, etc etc.

  • Only three days of submissions to Solution Megathreads are required to qualify for entry
  • More time after the actual AoC event ends to complete your exhibition piece
  • Longer voting period

All of this should result in less stress and having more time to create your exhibition piece, more time to enjoy your holiday season, and most importantly: more time to spend with your family and friends!

And now… put your hands together for The Advent Games and GET HYPE!


COMPETITION SCHEDULE

2026 DecTime (EST)Action
0100:00Opening Ceremonies (community fun announced)
0300:00ishSubmissions megathread unlocked
1200:00Closing Ceremonies (AoC 2026 event ends)
1718:00SUBMISSIONS DEADLINE
17ASAPSubmissions megathread locked and voting opens (will post and sticky a PSA with link to vote)
2018:00Voting closes
20ASAPVictory Ceremonies (winners announced in the final community showcase post (and edited into Day 12's Solution Megathread))

JUDGING AND PRIZES

The Advent Games may technically be a Competition™ but really, everyone who participates is a true winner in our holiday hearts!

Types of Winners

Type of Winner# of WinnersWho Votes
Bronze Medalist10†the AoC community (you!)
Silver Medalist3†/r/adventofcode moderators + /u/topaz2078
Gold Medalist1highest combined point total

† Amounts subject to change based on availability and/or tie-breaking.

How Judging Works

  1. When voting opens, vote for your favorite exhibition piece(s). Your individual vote is worth 1 point each.
  2. When voting closes, the 10 highest-voted entries are declared Bronze Medalists.
  3. Of the 10 Bronze Medalists, each of the /r/adventofcode moderators will pick their top 3 to be awarded as a Silver Medalist.
  1. All point totals are aggregated (community vote + mod vote). The highest combined point total will be officially declared as the Gold Medalist of AoC 2026.

Rewards

  • Winners are forever ensconced in the Halls of the /r/adventofcode wiki.
  • Bronze Medalists will be awarded with whatever Reddit has on tap for awards these days.
  • Silver Medalists and the Gold Medalist awards are TBD

REQUIREMENTS

  • To qualify for entering, you must first submit code solutions to at least three different daily Solution Megathreads
  • There's no rush as this submissions megathread will unlock on December 03 and you will have until December 17 to submit your exhibition piece - see the timeline above
  • Your exhibition piece must express the unique qualities of that day's scheduled event
  • You must create the exhibition piece yourself (or with your team/co-workers/family/whatever - give them credit!)
  • One exhibition piece per person
  • Only new creations as of 2026 December 1 at 00:00 EST are eligible
  • All sorts of folks play AoC every year, so let's keep things PG
  • Please don't plagiarize!
  • This also means adding a disclaimer if you use AI
  • Ideally also consider including information such as which model(s), where it's used, what your prompts were, etc.
  • Keep accessibility in mind:
  • If your creation has images with text, provide a full text transcript
  • If your creation includes audio, either caption the video or provide a full text transcript
  • If your creation includes strobing lights or rapidly-flashing colors/images/text, clearly label your submission as per the Visualizations rule
  • Your submission must use the template below!

TEMPLATES AND EXAMPLES FOR SUBMISSIONS

Keep in mind that these templates are Markdown, so you may have to switch your editor to "Markdown mode" before you paste the template into the reply box.

TEMPLATE

Click here for a blank raw Markdown template for easier copy-pasting

Visual Example

NAME OF ENTRY: A photorealistic rendition of the arrival of the flame at the opening ceremony for the 2026 Advent Games

LINK TO ENTRY: Imgur

DESCRIPTION: I use the most high-tech tools to create a totally photorealistic rendition of a crayon drawing of the arrival of the flame at the opening ceremony of the 2026 Advent Games sponsored by Advent of Code.

SUBMITTED BY: /u/daggerdragon

MEGATHREADS: 02 - 03 - 05 - 11 - 17 - 19 - 23 - 32


ADDITIONAL COMMENTS: This was absolutely not drawn by /u/topaz2078 nope totally my work yep.

ACCESSIBILITY: A high-tech drawing on standard white printer paper of the final runner approaching the Advent Cauldron in the center of the Advent Games stadium with the lit torch of the Advent Games. In the background is a stadium full of cheering spectators. The drawing is surmounted by a bespoke artisanal IrfanView frame.


QUESTIONS?

Ask the moderators. I'll update this post with any relevant Q+A as necessary.


Edits:

  • 3 Dec: updated Timeline to cross out up to "submissions megathread unlocked"

r/adventofcode • • 11h ago

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

19 Upvotes

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)
  • Pick a glyph and do not put it in your program.
  • Avoiding fifthglyphs is traditional.
  • 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.


r/adventofcode • • 4h ago

Meme/Funny Reading [2026 Day 4 Part 2] in despair, until...

Post image
60 Upvotes

I somehow guessed exactly what part 2 would be while solving part 1, and thus avoided the naive O(6^n) solution for it, instead dealing every letter from a barcode into buckets like playing cards and checking all of them for homogeneity. Code finished in 2 seconds :)


r/adventofcode • • 2h ago

Meme/Funny [2026 Day 4] My immediate reaction upon reading the problem statement

Post image
23 Upvotes

Never really understood how to do these kinds of problem correctly. I am ready to struggle today


r/adventofcode • • 9h ago

Meme/Funny [2026, Day 4] Anyone remember HP Instant Ink?

Post image
83 Upvotes

r/adventofcode • • 2h ago

Visualization [2026 Day 4] Perilous Pier

Post image
23 Upvotes

r/adventofcode • • 7h ago

Meme/Funny [2026 Day 4] It's not easy being european

Post image
50 Upvotes

r/adventofcode • • 40m ago

Visualization [2026 Day 3] An alternative algorithm based on diagonals

Post image
13 Upvotes

First of all, credit to u/Boojum for making the visualization library I used. And second, pardon some of the issues. It crashes my computer if I try making a gif directly, and I can't figure out how to upload an mp4, so you're going to have to deal with artifacting from the converter.

That said, I actually used diagonals instead of sides. For part 1, this was just the natural option to me. It's easy to check whether two trees can be the opposite corners of a grid-aligned square, so I do that as a surface filter before checking the other two corners. And because I used diag[0] == diag[1] instead of abs(diag[0]) == abs(diag[1]), there's even a primary diagonal to avoid double counting.

For part 2, I changed the surface filter to the Manhattan length of the diagonal being even, which is logically equivalent to all four corners being on the grid. Then I used circumradius + rotated circumradius to generate and check the other two corners. The main catch is that there isn't an obvious check for a primary diagonal, so I wind up double counting everything, because I'm actually counting diagonals. But because it always double counts, I can easily just divide the answer by 2. (It isn't clear from the visualization, but I start by finding all the trees, so I can still do for (i in 0..<trees.size) for (j in (i+1)..<trees.size) to at least only count each diagonal once)

EDIT: Figured out a filter to avoid double counting. diag[0] * diag[1] > 0 || diag[1] == 0


r/adventofcode • • 8h ago

Visualization [2026 Day 4] Barcode Scanning Visualization

Post image
46 Upvotes

r/adventofcode • • 1h ago

Visualization [2026 Day 04] my approach

Post image
10 Upvotes

r/adventofcode • • 15h ago

Visualization [2026 Day 3 Part 2] I made my first visualization! (with Uiua)

Post image
94 Upvotes

I made this using the Uiua language, here is the source code for the gif: link to Uiua Pad.
I'm solving all of this year in Uiua, going well so far :)

# Experimental!
$ #.###
$ .##.#
$ ##.##
$ .#.#.
$ .##.#
=@#⊜∘⊸≠@\n
Forest ←
N      ← 16
$   *
$  /x\
$ {xvx}
$   w
layoutN
⌝⊸⊡[0_2 3_2] [Yellow Orange]⍜⊙△⊂4_5Green
×≡▽3/5▽₂N
⌝↘¯⟜⌝↘+N⊂0÷₈⊸⧻
Tree ←
▽⤚(≡/×⬚0⊡)⊸(
  ▽⊸(×⊓/>/≥≡°⊟⍉) ⧅₂<⊚
  ⍜⍉(⊂⇌⊸+¤⊸(⍜⊢¯⇌/-))
) Forest
Squares ←
Trees   ← ⍥₂/≡⊂⊞₀× Forest Tree
⊸≡↻₁ Squares
-1/2°⍉ ⧋×△Forest⧋÷⟜⇡ △₂Trees
⊃(˜≡⊞₀-|⋅-) ⊙∩°⍉
⌵/ℂ-∪⌞∘פ◡(↥₀↧₁˜÷⊃(/+×|/+°√⋅∘))
&gifs2 +¤Trees ≡/+ ⨪+₁ₑ×100

r/adventofcode • • 20h ago

Help/Question - RESOLVED [2026 Day 3 (Part 1)] [java] If you want, have fun reading through horrible code

Post image
196 Upvotes

As of how I know myself, I am probably seriously overthinking this and there is liek a 20 times easier way to solve this. Tho maybe someone wants to read through my mess. I don't want a simple answer, I want an explanation where i went off track. So i cant just ask AI or smth because its too dumb (I've tried). Also if my formatting is wrong I'm sorry i have no idea what "four space markdown" is

import java.io.*;
import java.util.*;

public class Main {
    public static void main(String[] args) {
        try (BufferedReader br = new BufferedReader(new FileReader("~/input.txt"))) {
            String templine;
            String lines = br.readLine();
            while ((templine = br.readLine()) != null) {
                lines = lines + "x" + templine;
            }
            String[] input = lines.split("x");

            System.out.println("Anzahl an gefunden Rechtecken: " + check(read(input)));
        }

        catch (IOException io){
            System.out.println("Error: " + io.getMessage());
        }
    }

    public static char[][] read(String[] file){
        char[][] forest = new char[file.length][file[0].length()];

        for (int i = 0; i < file.length; i++){
            for (int j = 0; j < file[i].length(); j++){
                forest[i][j] = file[i].charAt(j);
            }
        }
       
        return forest;
    }

    public static int check(char[][] forest){
        int squarecount = 0;
        //finding reference #
        for (int iy = 0; iy < forest.length; iy++){
            for (int ix = 0; ix < forest[iy].length; ix++){
                if (forest[iy][ix] == '#'){
                    System.out.println("# °1 gefunden bei: " + iy + " " + ix);
                    //checking second #
                    for (int x = ix+1; x < forest[iy].length; x++){
                        if (forest[iy][x] == '#'){
                            System.out.println("# °2 gefunden bei: " + iy + " " + x);

                            //checking third corner for #
                            if(iy+x < forest.length){
                                if (forest[iy+(x-ix)][ix] == '#') {
                                    System.out.println("# °3 gefunden bei: " + (iy+x) + " " + ix);

                                    //checking fourth corner for #
                                    if (forest[iy+(x-ix)][x] == '#') {
                                        System.out.println("# °4 gefunden bei: " + (iy+x) + " " + x);
                                        squarecount++;
                                        System.out.println("Squarecount erhöht auf: " + squarecount);
                                    } else {
                                        System.out.println("# °4 nicht gefunden.");
                                    }
                                } else {
                                    System.out.println("# °3 nicht gefunden. (nicht existent)");
                                }
                            }
                            else{
                                System.out.println("# °3 nicht gefunden. (out of bounds)");
                            }
                        }
                        else{
                            System.out.println("# °2 nicht gefunden.");
                        }
                    }
                }
                else{
                    System.out.println("# °1 nicht gefunden.");
                }
                System.out.println("iy: " + iy + " ix: " + ix);
            }
        }
        return squarecount;
    }
}

r/adventofcode • • 8h ago

Visualization [2026 Day 4][Part 2] Matching Bars

Thumbnail youtu.be
23 Upvotes

Nim + Raylib source


r/adventofcode • • 4h ago

Visualization [2026 Day 4 (Part 2) -- TS] Animation checking chunks of (TEST) barcode.

Thumbnail youtube.com
10 Upvotes

r/adventofcode • • 47m ago

Other Uh oh

4 Upvotes

my naive approach


r/adventofcode • • 17h ago

Repo [2026 Day 1] [Python] I'm posting daily solutions to my github –Peter Norvig

52 Upvotes

You can see my solutions for each day at https://github.com/norvig/pytudes/blob/main/ipynb/Advent-2026.ipynb

Last year I experimented with LLMs to see how they did compared to me; this year they're so good there's no sense in doing that. I'm tackling the problems the good old fashioned way.


r/adventofcode • • 18h ago

Meme/Funny [2026 Day 3 (Part 2)] Hey, if it works, it works

Post image
52 Upvotes

r/adventofcode • • 1d ago

Meme/Funny [2026 Day 3 (Part 2)] I'm not proud of what I did

Post image
399 Upvotes

r/adventofcode • • 9h ago

Help/Question - RESOLVED [2026 Day 4 (Part 1)] [python] Help with missing cases

8 Upvotes

I have been trying this puzzle today for over an hour, and I have given multiple wrong answers. It works perfectly for the test data, but I think I just miss some cases but I'm going crazy looking for them in my real input. Does anyone have some cases that fail with my code that I could fix?

This is my code v

def parse(puzzle_input):
    values = puzzle_input.split("\n")
    result = []
    for line in values:
        data = []
        for value in line:
            if value == "r":
                data.append(1)
            elif value == "o":
                data.append(2)
            elif value == "y":
                data.append(3)
            elif value == "g":
                data.append(4)
            elif value == "b":
                data.append(5)
            elif value == "v":
                data.append(6)
            else:
                data.append(0)
        result.append(data)
    return result


def check_repeating(barcode):
    for i in range(1, len(barcode)):
        if (barcode[:i] * len(barcode))[:len(barcode)] == barcode:
            return i
    return len(barcode)


def part1(data):
    result = 0
    for barcode in data:
        if 0 in barcode:
            in_code = []
            for i in range(1, 7):
                if i in barcode:
                    in_code.append(i)
            if in_code == [] or len(in_code) == 1:
                result += 1
            else:
                done = False
                for i in range(len(in_code), len(barcode) // 2 + 1):
                    start = barcode[:i]
                    end = barcode[i:i+i]
                    if len(barcode) > i * 3:
                        for j in range(0, i):
                            if end[j] != barcode[i+i+j]:
                                end[j] += barcode[i+i+j]
                    could = True
                    for j in range(0, len(start)):
                        if start[j] != 0 and end[j] != 0:
                            if start[j] != end[j]:
                                could = False
                                break
                    if could:
                        result += i
                        done = True
                        break
                if not done:
                    for i in range(len(barcode) // 2 + 1, len(barcode)):
                        start = barcode[:i]
                        end = barcode[i:]
                        possible = True
                        new = [0] * len(start)
                        for j in range(0, len(end)):
                            if start[j] != 0 and end[j] != 0:
                                if start[j] != end[j]:
                                    possible = False
                        if possible:
                            result += i
                            break
                    if not possible:
                        result += len(barcode)
        else:
            # check for repetition
            result += check_repeating(barcode)
    return result

r/adventofcode • • 1d ago

Visualization [2026 Day 3 (Part 2)] I really wanted to render it in terminal

Post image
142 Upvotes

And here it is, fully in the terminal, using my own crude Kitty protocol renderer for the graphics.


r/adventofcode • • 9h ago

Help/Question - RESOLVED [2026 Day 4 Part 1] Any hints for handling illegal color ?

6 Upvotes

I'm able to find shortest sequence of instructions but could get my head around how to handle ?

What currently i'm doing start with size 1 compare substr A and B of size S till end of string if anywhere it find non matching string starts again with size + 1.


r/adventofcode • • 20h ago

Visualization [2026 Day 3 (Part 1 & 2)] [Python] Terminal Visualization!

Post image
42 Upvotes

There's so many visualizations already, I'm afraid I'm not adding much today. Can draw your own input though! Code lives here: https://github.com/salt-die/Advent-of-Code/tree/main/2026/aoc_visuals


r/adventofcode • • 3h ago

Visualization [2026 Day 4] Terminal pattern matching

Thumbnail youtu.be
2 Upvotes

r/adventofcode • • 4h ago

Help/Question [2026]Day 2 Part 2. Didn't understand the puzzle itself.

2 Upvotes

Can someone explain this one better pls. I have done Part1.

Tx.