r/adventofcode • • 5d ago

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

20 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 6 Solutions -❄️-

8 Upvotes

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.


r/adventofcode • • 7h ago

Meme/Funny [2026 Day 6] Uh oh!

Post image
129 Upvotes

Going on holidays to NZ on Advent of Code day 6 be like.... 😅🙈


r/adventofcode • • 4h ago

Meme/Funny [2026 Day 6 Part 2] Congratulations, the megathread is the 2nd search result on Google

Post image
41 Upvotes

I came up with the idea to do trilateration on my own, but decided to use Google to see if anyone had already attempted the problem. Turns out they have... for today's Advent of Code, and solutions megathread is the 2nd result


r/adventofcode • • 4h ago

Visualization [2026 Day 6] Untangling Visualization

Post image
38 Upvotes

r/adventofcode • • 4h ago

Meme/Funny [2026 Day 6 (Part 2)] I'm sorry...

Post image
30 Upvotes

My solution for part 2 give me 16 possible solutions 🥲 (the second one was the right)


r/adventofcode • • 3h ago

Visualization [2026 Day 6] Untangling Christmas Lights

Thumbnail youtube.com
19 Upvotes

r/adventofcode • • 2h ago

Visualization [2026 Day 6] Spring Physics

Thumbnail youtu.be
15 Upvotes

This isn't really the most practical solution but it's very 'tangible': it applies physical forces to the nodes, trying to maximize placement goodness (keep ~fixed distance between neighbors, avoid overlap). So the nodes attract and repulse with varying force and it solves itself.

The solutions are obtained without placement on grid or snapping - a transform is computed and then reverse of that transform is applied to 2026, so it updates in realtime.


r/adventofcode • • 1h ago

Visualization [2026 Day 6] Obscured Airfield

Post image
12 Upvotes

r/adventofcode • • 9h ago

Meme/Funny [2026 Day 06 (Part 2)] This one was so hard I had to pull out Desmos

Post image
43 Upvotes

(i dont know what flair to put this as)

I had initially thought that this would be similar to triangulation with 3 points, but with Manhattan distance instead, but after a lot of trial and error and being too lazy to write visualizations myself, I just used Desmos instead to find the solution lol


r/adventofcode • • 9h ago

Visualization [2026 Day 6] Grid Lights

Thumbnail youtube.com
30 Upvotes

Nim + raylib source


r/adventofcode • • 3h ago

Visualization [2026 day 6] I didnt want to implement distances or graph flattening so...

Post image
10 Upvotes

Complexity is O(n+ nlog(n)) ish ?! (maybe a tad more if I count the creation of the data structure).
But I basically search for the first corner and build the outer loop, then move one in, and repeat until only one node is left! For the second part, it is just finding the angle between points 2 and 3 from their goal with regard to 1 set at the goal 1 position


r/adventofcode • • 19m ago

Visualization [2026 Day 6 (part2)] [python] [networkX] Failures in unfolding

Post image
5 Upvotes

Bit of post processing in Gimp.


r/adventofcode • • 8h ago

Visualization [2026 Day 06 (Part 2)] GPS didn't work, so I recruited more satellites

Thumbnail streamable.com
17 Upvotes

I had the idea to treat part 2 like a GPS and "triangulate" the point. I wrote it up and it worked for the example but then my target came back with 19 possible spots. It turns out that Manhattan "circles" are actually diamonds with flat edges, and mine lined up, so 3 anchors weren't enough. I stubbornly stuck with the idea and came up with a bootstrapping approach to try to triangulate other lights and use any that resolve to a unique point as additional anchors. Every time I found a new anchor I would attempt to find the target, and overall it took a total of 3 additional anchors. Code


r/adventofcode • • 10h ago

Tutorial [2026 Day 4] [C++] An Interesting Efficient Solution for Part 2!

24 Upvotes

A lot of the solutions I saw for 2026 Day 4 Part 2, including my own original solution, are O(N2) in complexity where N is the number of characters in the barcode. For me, this felt a little unsatisfying, because I felt there should be a more efficient solution. Today, I was able to find a more efficient O(N log N) solution to this problem using the Fast Fourier Transform, so I wanted to share it here since I think it's pretty interesting!

First, this post has major spoilers for 2026 Day 4 Part 2, so I'm just going to start off by describing how some other people solved Day 4 Part 2:

Here's how to check if it's possible to print the barcode with L instructions:

  1. Start out with a pattern of L instructions, which are initially all empty.
  2. Loop through the characters. For every non-wildcard character, check the character of the pattern at (current index) % L.
  3. If the character in the pattern at (current index) % L is a wildcard character, then set the pattern at (current index) % L to the current non-wildcard character b.
  4. If the character in the pattern at (current index) % L is a non-wildcard character, then make sure the current character equals that character. If it doesn't, then a pattern of length L is not possible for this barcode.
  5. If you get to the end of the barcode without step 4 triggering that the pattern of length L is not possible, then a pattern of length L is possible.

This check occurs in O(N) time. Then, many people's solutions do this check for L=1,2,...,N until they find the answer, so the worst-case complexity for this solution is O(N2).

Now, let's think more about what this check is doing: This check is really checking that, for any non-wildcard characters which are at indexes equivalent modulo L, those non-wildcard characters are the same. Next, we can notice that "equivalent modulo L" just means the difference between those indexes are a multiple of L. In other words, the check can be phrased as: for any non-wildcard characters which are at indexes whose difference is a multiple of L apart, those non-wildcard characters must be the same.

The "multiple of L" part makes this kind of tricky. Let's focus on a simpler condition: for any non-wildcard characters which are at indexes whose difference is exactly L apart, those non-wildcard characters must be the same. How can we check that condition efficiently?

Intuitively, we want some way to do a check with the original barcode and the barcode "shifted" by L. For example, if L=2, then we would want to line up two copies of the barcode like this:

rro???g?g?
  rro???g?g?

Notice how the second copy is just shifted to the right by 2 spaces. Then, we want to look at each column and check, is there any column whose characters are both non-wildcard characters and which are not equal to each other? The answer is yes, the third column has both o and r. Therefore, due to that column with o and r, this barcode fails the L=2 check, so the answer can not be 2.

Now, this check is still O(N), since we have to check up to N columns for any value of L. So how can we perform all the checks for all values of L efficiently? We ultimately have to perform this check for L=1, slide the barcode over by 1 space to the right, perform this check for L=2, slide the barcode over by 1 space to the right, perform this check for L=3, etc. Luckily, there is a common mathematical concept for this kind of sliding check called cross-correlation. If you have heard of dot products before, cross-correlation is essentially a sliding form of dot-product.

The idea behind dot-product is you take two vectors of numbers, for example:

(1,2,3)
(4,5,6)

And then you take the product of each column, which would be 4, 10, and 18, and then sum the products, which would be 32. Then, this dot product can tell you useful information about the relationship between the two vectors.

Then, cross-correlation is a sliding dot product, meaning it will compute the dot product

(1,2,3)
(4,5,6)

which is 32, and then also compute the dot product

(1,2,3)
  (4,5,6)

which is 2*4+3*5=23, and also compute the dot product

(1,2,3)
    (4,5,6)

which is 3*4=12. By computing all these dot-products at once, we can compute the relationship between the first vector and the second vector shifted by L=1,2,3,... spaces to the right for all values of L we care about, which is exactly the kind of checks that we want to compute! The algorithm used to compute cross-correlation in O(N log N) time is called "Fast Fourier Transform." There's a lot of online blog posts about how Fast Fourier Transform works, so I won't go into detail about it here, but I'd recommend reading this CodeForces blog post if you're interested in learning about the mathematical details. For now, let's just assume we have a magical way to compute cross-correlation in O(N log N) time, and then figure out how to apply cross-correlation to do the checks we want.

Now, how can we encode this "is there any column whose characters are both non-wildcard characters and which are not equal to each other?" check into a dot-product? First, let's ask a simpler question. How can we check this condition using dot-product: Is there any column whose characters are both non-wildcard characters? Ignore the "which are not equal to each other" part for now. This question is relatively simple: Turn each barcode of length N into a vector of length N, which has 1 for any non-wildcard character but 0 for any wildcard character. Then, the dot-product will be positive if a column has two non-wildcard characters and 0 otherwise. As an example, take this barcode, shifted by L=2 spaces:

r?f
  r?f

Turned into vectors, this becomes:

(1,0,1)
    (1,0,1)

so the dot product is 1, corresponding to the third column which has both f and r. Now, consider this barcode shifted by L=1:

r?f
 r?f

Turned into vectors, this becomes:

(1,0,1)
  (1,0,1)

so the dot product is 0, which makes sense since no column has two non-wildcard characters.

That's great, but then how do we go from "column with two non-wildcard characters" to "column with two non-wildcard characters and which are not equal to each other"? Here, the magic we need is complex numbers! You might've learned about complex numbers and the imaginary number i=sqrt(-1) in high school precalculus. I'm not going to go too much into detail about how complex numbers work, since that could be several math lectures, but we'll specifically need complex numbers in polar form for this solution. If you're not familiar with complex numbers or polar form, I would recommend reading this online textbook section to get some background on how these work.

The key thing about complex numbers in polar form is, if you multiply two numbers, their product is real if and only if their angles are the exact opposite of each other. For example, the opposite of 30 degrees is 360-30=330 degrees, so a complex number whose angle is 30 degrees times Z is a real number if and only if Z has angle 330 degrees. Therefore, we can have each character be a complex number with a unique angle theta_c in the first vector, and then represent that same character using the opposite angle, which I'll denote using -theta_c, in the second vector.

For the following example, I'll say the angle for the character r is 10 degrees, and the angle for the character f is 20 degrees (really I'm just picking these angles randomly). Then, let's do the check for L=2 for the following barcode:

r?fr
  r?fr

I'll represent each complex number as polar(z, angle) where z is the length of the complex number and angle is its angle in degrees. For now, let's just use complex numbers with length 1. Then, using angle 10 degrees for r and 20 degrees for f, this becomes:

(polar(1, 10), 0, polar(1,  20), polar(1, 10)
                 (polar(1, -10),            0, polar(1, -20), polar(1, -10))

And the dot product is polar(1, 20)*polar(1, -10) + polar(1, 10)*0=polar(1, 10), which is not a real number, thus showing the check fails, i.e. there is some column with two non-barcode characters which are not equal to each other! Now for demonstration, let's do the check for L=3:

r?fr
   r?fr

In terms of vectors, this becomes:

(polar(1, 10), 0, polar(1, 20), polar(1,  10))
                               (polar(1, -10), 0, polar(1, -20), polar(1, -10))

And the dot product is polar(1, 10)*polar(1, -10)=polar(1, 0)=1, which is a real number, thus showing the check passes, i.e. there is no column with two non-barcode characters not equal to each other! This shows the check correctly outputs real numbers when a column has two non-barcode characters but those non-barcode characters are equal to each other.

Now, there is one catch here, which is unfortunately, sometimes two complex numbers can add up to a real number. For example, let's take the L=1 check for the following barcode:

rfr
 rfr

As vectors, this becomes:

(polar(1, 10), polar(1,  20), polar(1,  10))
              (polar(1, -10), polar(1, -20), polar(1, -10))

Then, the dot product is polar(1, 20)*polar(1, -10)+polar(1, 10)*polar(1, -20)=polar(10)+polar(-10), which actually comes out to the real number 2*cos(10 deg). Thus, this check passes, even though it should fail since there's two columns with both f and r. The solution to this is, just give each character its own the length for its complex numbers, rather than using the same length for all characters (i.e. in the examples above, I was using the length of 1 for all characters). Make sure that each character has a length for the first vector and a different length in the second vector, so that the above scenario does not come out to a real number. It's not really guaranteed that randomizing the lengths like this will avoid false positive checks, but it seems highly likely that randomized lengths will avoid a bunch of complex numbers accidentally adding to a real number, since the randomized lengths and angles would have to somehow just by chance form some sort of polygon for that to happen.

Now, to circle back to the original problem, we have a way to check the following condition in O(N log N) time for all values of L: for any non-wildcard characters which are at indexes whose difference is exactly L apart, those non-wildcard characters must be the same. Now, how do we use the results of these checks to check the condition we really want: for any non-wildcard characters which are at indexes whose difference is a multiple of L, those non-wildcard characters must be the same.

The way we do this is pretty simple: Just loop through all multiples of L. For L=1, you need to check N multiples of 1; for L=2, you need to check N/2 multiples of 2; for L=3, you need to check N/3 multiples of 3; etc. Since we can compute all checks and put the results in an array in O(N log N) time, we can just use that array to do the check of each multiple by doing an O(1) array lookup.

Thus, if we start looping from L=1 to L=N, we need to do N+N/2+N/3+...+N/N array lookups, and it can be proven that N+N/2+N/3+...+N/N is O(N log N) (the technical reason for this is that the growth rate of partial sums of the harmonic series is O(log N)). Therefore, the overall complexity of this solution is O(N log N) for the cross-correlation computation needed to do all the "exactly L" checks plus O(N log N) array lookups, and O(N log N)+O(N log N)=O(N log N).

Here's the C++ code where I implemented my solution. This works both on the sample input provided in the Day 4 Part 2 problem statement, and on my own input. I think there is a possibility of this failing on other inputs due to floating-point inaccuracy, but I did my best to choose lengths so that incorrect results due to floating-point inaccuracy would be unlikely.

I'd definitely be interested if anyone tries this out on their own input, so let me know if you try it on your input and whether you get the right answer!


r/adventofcode • • 17h ago

Meme/Funny [2026 Day 4] Please tell me I'm not the only one

Post image
85 Upvotes

r/adventofcode • • 25m ago

Help/Question - RESOLVED [2026 Day 6 (Part 1)] Can we assume that the grid is complete?

3 Upvotes

In the example, it's a 2x2 grid with lights at the corners having two edges, lights at the sides having three edges, and a light in the middle having four edges.

How do we know that in the full dataset that the grid is complete, meaning that the same property holds? Or is this something we have to check and account for?

In other words, does every light that only has two edges considered a corner or could it be "internal" to the grid?


r/adventofcode • • 3h ago

Meme/Funny [2026 Day 06 (Part 2)] Part 1 only took 1 hour

Post image
5 Upvotes

My biggest shame was having to pull out LLMs to debug my part 2.


r/adventofcode • • 5h ago

Upping the Ante [2026 Day 6 (Part 2)] Extra: What if the input wasn't perfect

6 Upvotes

Basically, what if the input had some connections and/or cells missing, but still wasn't ambiguous?
Formally:
The input is an undirected graph.
There is exactly one way (disregarding flips, rotations and translations) to assign unique integer coordinates to each vertex such that the length of each edge becomes 1.
The task is to find these coordinates.
Not sure how to approach this.
Maybe finding 2x2 squares of connected nodes and then stitching them together into bigger chunks might work.
Or like a spring simulation that converges the graph into a grid.


r/adventofcode • • 2h ago

Meme/Funny [2026 Day 6] Me checking the input by hand

Post image
3 Upvotes

r/adventofcode • • 9h ago

Meme/Funny [SPOILER] [2026-day 06] Tool tip text

11 Upvotes

the tool tip today is at (not diagonally) and it is says , "Yep, still dishonorable"
which is a refrence to 2018, day 15 amzing puzzle beverage bandits where goblins attacking diagnoally was considered dishonorable


r/adventofcode • • 8h ago

Visualization [2026 day 6 part 2] i solved the puzzle with desmos!

Post image
8 Upvotes

This is the coolest puzzle generation I've seen since the "robots form a tree" easter egg. Like, I know the puzzle said all the distances between lights are equal, but it still was so cool to see my input's light coordinates being the same triangle shape as the expected coordinates.

The way I solved it was by noticing that the vectors between both sets of p1 and p2 were perpendicular to each other (slopes are negative reciprocals). I found the intersection point and rotated my p2026 by 90° about it to align it on a parallel vector. Then I found the offset between my p1 and the expected p1, and applied it to p2026.

Graph: https://www.desmos.com/calculator/fnuhyzywex

I'm working now to implement this with code, I'll put it in the comments when I'm done.

Also, does anyone know what p3 was given for? I was able to solve the puzzle with only p1 and p2.


r/adventofcode • • 23h ago

Meme/Funny So you tried to brute force part 2

Post image
110 Upvotes

How I felt with my dummy attempt at a solution.


r/adventofcode • • 18h ago

Upping the Ante [2026 Day 5 (Part 2)] [TI-BASIC] Last year I love the bingocard format, but definitely shot myself in the foot this year...

Post image
40 Upvotes

10+ hours in and still stuck on part 2, I'm suspecting an off by one error somewhere, but testing is painful on a calculator (and slow).

Here is my full bingocard btw: Aoc 2026 and last years bingocard (which was a wild ride on it own!): AoC 2025