r/adventofcode • u/subspace_mp4 • 9h ago
r/adventofcode • u/daggerdragon • 13h ago
SOLUTION MEGATHREAD -❄️- 2026 Day 1 Solutions -❄️-
It's that time of year again for tearing your hair out over your code holiday programming joy and aberrant sleep for two weeks helping Santa and his elves! If you participated in a previous year, welcome back, and if you're new this year, we hope you have fun and learn lots!
As always, we're following the same general format as previous years' megathreads, so make sure to read the full posting rules in our community wiki before you post!
RULES FOR POSTING IN SOLUTION MEGATHREADS
If you have any questions, please create your own post in /r/adventofcode with the Help/Question flair and ask!
Above all, remember, AoC is all about learning more about the wonderful world of programming while hopefully having fun!
REMINDERS FOR THIS YEAR
- All of our rules, FAQs, resources, etc. are in our community wiki.
- If you see content in the subreddit or megathreads that violates one of our rules, either inform the user (politely and gently!) or use the report button on the post/comment and the mods will take care of it.
- If you post your code from a repo or the like, do not make your puzzle input public!
- Top-level
Solution Megathreadposts must begin with the case-sensitive string literal[LANGUAGE: xyz] - Obviously,
xyzis the programming language your solution employs - Use the full name of the language e.g.
JavaScriptnot justJS - The List of Streamers has a new megathread for this year's streamers, so if you're interested, add yourself to 📺 AoC 2026 List of Streamers 📺
COMMUNITY NEWS
- Veloxx will continue to drop some lit beats for 1.5 hours after today's unlock!
- /u/jeroenheijmans is back again this year with their Unofficial AoC 2026 Participant Survey!
- 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
- Full details, rules, timeline, templates, etc. will be in the Submissions Megathread
(post and link incoming very shortly!) - edit: -❄️- Advent of Code 2026: The Advent Games -❄️- Submissions Megathread -❄️-
AoC Community Fun 2026: The Advent Games
Today's Event: Opening Ceremonies
Today's schedule consists of:
- Arrival of the Flame
- Parade of Nations1
- Give us a quick introduction to yourself!
- Tell us what country you're from
- Tell us about your country's holiday festivities
- Explain why you chose your programming language
- Tell us what you hope to learn or have already learned about your chosen programming language
- Tell us where to find your AoC repo of puzzle solutions2, blag, and/or $streaming_service3!
- Artistic Program
- Show us your holiday tree | menorah | Krampusnacht costume | /r/battlestations with festive decorations!
- Show us your kittens and puppies and $critters!
- Show and/or tell us about whatever brings you comfort and joy in the holiday season!
- Competition Schedule (Theoretical)
- Tell us which "sporting" events you think will be coming up over the next two weeks and which ones you'd like to participate in the most!
1 Obviously, this is the Internet, which is public, so only put out information that you're comfortable with the entire world knowing. Feel free to invent a holiday-themed persona; after all, sometimes you get sent to space, so why limit yourself to the boring ol' meat skeleton that dwells upon the third rock from the sun?
2 Refer to the third bullet in the "Reminders" section above!
3 Refer to the last bullet in the "Reminders" section above for the link
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 1: Dusty Shed ---
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?
r/adventofcode • u/daggerdragon • 13h ago
Upping the Ante -❄️- Advent of Code 2026: The Advent Games -❄️- Submissions Megathread -❄️-
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 Dec | Time (EST) | Action |
|---|---|---|
| 01 | 00:00 | Opening Ceremonies (community fun announced) |
| 03 | 00:00ish | Submissions megathread unlocked |
| 12 | 00:00 | Closing Ceremonies (AoC 2026 event ends) |
| 17 | 18:00 | SUBMISSIONS DEADLINE |
| 17 | ASAP | Submissions megathread locked and voting opens (will post and sticky a PSA with link to vote) |
| 20 | 18:00 | Voting closes |
| 20 | ASAP | Victory 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 Winners | Who Votes |
|---|---|---|
| Bronze Medalist | 10† | the AoC community (you!) |
| Silver Medalist | 3† | /r/adventofcode moderators + /u/topaz2078 |
| Gold Medalist | 1 | highest combined point total |
† Amounts subject to change based on availability and/or tie-breaking.
How Judging Works
- When voting opens, vote for your favorite exhibition piece(s). Your individual vote is worth 1 point each.
- When voting closes, the 10 highest-voted entries are declared
Bronze Medalists. - Of the 10
Bronze Medalists, each of the /r/adventofcode moderators will pick their top 3 to be awarded as aSilver Medalist.
- The votes of us lowly rank-and-file moderators (/u/daggerdragon and /u/Aneurysm9) are worth +3 points each while /u/topaz2078's votes are worth +5 each.
- All point totals are aggregated (community vote + mod vote). The highest combined point total will be officially declared as the
Gold Medalistof 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 theGold Medalistawards 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.
r/adventofcode • u/SweepingRocks • 13h ago
Meme/Funny [2026 Day 1] Anyone else psych themselves out with the first day only to find...
r/adventofcode • u/asgardian28 • 12h ago
Other AoC amount of participants
With AI and all I was expecting the amount of participants to take a nosedive. When I check the stats I think I see that happening. This community will continue as one of hobbyist that just enjoy an activity for the sake of doing it.
Does it mean that AoC is no longer useful? No, learning, logical thinking and problem solving will always be useful skills. Eric's move last year to remove the leaderboard was a good one and we can continue this event in true Christmas spirit! Good to see you back friends and happy holidays!
r/adventofcode • u/Boojum • 11h ago
Visualization [2026 Day 1] Raining Boxes Visualization
r/adventofcode • u/123IshaTest • 4h ago
Visualization [2026 Day 1] Simulation approach
youtube.comThis year I trying a completely new approach to Advent of Code: Simulation
Instead of a script that calculates the answer, I create individual objects that interact with each other and converge to a solution. There is no single variable that is counting towards a solution, we just press play and hope for the best!
For day 1, each id gets represented as a colored box that bounces around. When it smashes into a box with the same id, they merge.
The green strip is a sensor that checks the smallest and largest boxes that pass through it.
r/adventofcode • u/Both-Touch990 • 12h ago
Meme/Funny [2026 Day 1] How it felt speedrunning both of today's stars in less than 30 minutes only to realize what could lie ahead
(Speaking from experience with 2025's calendar)
r/adventofcode • u/tedchs • 2h ago
Other Candy Cane Coding Caper
For Advent I just launched Candy Cane Coding Caper, a coding adventure inspired by Advent of Code, for kids 8-12. Each day presents an interactive, structured lesson about a simple Python programming concept. I thought this community might like to take a look!
All Python code runs locally in the browser through Pyodide and WASM, and game state is stored locally.
This is brand new and I would love any feedback or questions!
r/adventofcode • u/SlayLeafSlug • 3h ago
Meme/Funny AoC in Prolog?!?!
I was filling in the unoficcial AoC survey
(⭐ Take the (~5min) Unofficial AoC 2026 Survey: https://forms.gle/JbZKoBqzG248Z6RV6 ⭐)
And I saw this:


Who the hell is out there doing AoC in Prolog😭
r/adventofcode • u/kscoaster • 3h ago
Help/Question Advent of Code - Mystery Shop Item
I realize this question runs counter to the whole "mystery" thing, but... Can someone at least confirm if the "mystery tee" on the AoC shop (US) is at least Advent of Code related?
FYI - this is what I'm seeing:
r/adventofcode • u/fnordargle • 4h ago
Upping the Ante [2026 Day 1] Huge inputs
Trying to think of algorithms that can solve this for huge inputs, or where many of the assumptions about the input do not hold.
By huge I mean the inputs are large enough that you don't even have enough memory to store counters for every number in the input, let along read the entire input file into memory.
It's like the definition of "Big Data":
* It's not when you can't fit the entire dataset into memory, it's when you can't even fit the index into memory
I like the think about problems like this with increasing levels of restrictions.
With a file with only ~2000 lines we don't have to think about complexity that much, but if the file contained 4,000,000,000 lines we could have the situation where we have three numbers that only appeared once, three numbers that only appeared 3 times, and then 1,999,999,994 numbers that appear twice.
Another assumption that some solutions make is that the frequency count of the numbers that appear in the top and bottom 3 must themselves be relatively unique as 4 numbers that all appear 4 times cannot all be in the top or bottom 3 in a deterministic manner.
To counter this it's trivial to craft an input that has a huge number of lines where even the frequency counts are unique. e.g. Consider the input formed of numbers `1` to `n` where every number `x` appears `x` times. Every item has a unique frequency count but the answer is still deterministic. (And it is similarly trivial to swap 1, 2, 3, `n-2`, `n-1`, `n` with 6 other numbers in the range so the answer isn't obvious up front.)
a) Let's pretend that memory is constrained such that we don't even have enough memory to store counters for all of the unique elements in the input, but we are free to read/write to intermediate local files and that we have enough space to store a bit more than another copy of the original input file.
The standard approach here is to split the input file into `n` smaller files, making sure that any occurrence of a number always appears in the same file. So for number `x` we write it to file `x mod n` every time we encounter it in the input. We choose `n` such that we *can* process `n` individual counters in memory in one go.
Once we've split the input into `n` sub files we process each one of those in turn in memory using the standard `O(n)` algorithm and keep track of the top 3 and bottom 3 item counts we've seen as we go.
b) Now let's imagine that we have no extra local storage, can we still do this?
Yes, but it's going to be a lot slower. Instead of splitting the input into `n` smaller files we just iterate over the main input file `n` times only processing lines that have `x mod n = a` as we loop `a` from `0` to `n-1`. This has the same effect as above but there's a lot of redundant reading involved as the vast majority of inputs read in each loop will be ignored.
c) Final restriction is what if the input is presented to us as a stream that we can't rewind or replay, and we can't write to any local storage, and we can't keep track of all of the possible values in memory. Possible?
I can't think of anything that guarantees getting the right answer without making some assumptions about the input.
r/adventofcode • u/zaperfish • 3h ago
Repo [Rust] Tiny helper for rust aoc
Hey people,
I just wanted present this tiny, dependency free, helper to solve advent of code in rust. Its built by hand.
All it does is handle input, run and time your solutions and submit your answers from the terminal.
I wanted it to be very minimal so you can decide on your project layout yourself.
$ cargo run --release --bin day01 -- --submit
2025 Day 1:
Part 1: 1 333ns
Part 2: unsolved
Submitting "1" for part 1:
*\(^o^)/* That's the correct answer!Also any feedback is welcome!
https://github.com/zaperfish/aoc-rust
Happy solving! :)
r/adventofcode • u/p88h • 6h ago
Visualization [2026 Day 1] No-Sort
youtube.comLeverages the specific output distribution (top 3 elements and bottom three elements have to fall on unique-ish count buckets so that the answer is deterministic) to reduce the problem to 3 phase counting:
- step 1: count the occurrences of each input (1000 buckets)
- step 2: compute the counts histogram
- step 3: select the top/bottom histogram buckets
then identify the elements with specific counts.
Nim + Raylib source
r/adventofcode • u/encse • 5h ago
Repo Advent of Code in C# solutions, illustrations and a template project
Just like in previous years, I plan to continue my illustrated journey in C#.
The website is at https://aoc.csokavar.hu, my repository can be found in https://github.com/encse/adventofcode, with a template extracted to https://github.com/encse/adventofcode-template.
r/adventofcode • u/jeroenheijmans • 13h ago
Upping the Ante [2026] Unofficial AoC 2026 Participant Survey!
Another December, another chance for puzzling, and .... another Advent of Code Survey!
It's anonymous, open, and quick. Please fill it out (but onliy once, please <3). Copy-pastable announcement:
--------
⭐ Take the (~5min) Unofficial AoC 2026 Survey: https://forms.gle/JbZKoBqzG248Z6RV6 ⭐
--------
Please do help spread the word! Just copypasta the above to your favorite relevant outlet and help us get a bunch of interesting results! We have questions about:
- Previous editions participation (simplified in 2026)
- Language, Tools, OS
- Leaderboard and motivation
- repeat from 2025.... EMOTIONS! 😁🫡😱😮😭😖😠😬
Check out results from previous years at: https://jeroenheijmans.github.io/advent-of-code-surveys/
--------
Last year I closed the submissions on Dec 12th and published on Dec 13th. I'm open to suggestions... do you reckon that's the right call again this year? Feels good to release results on a Sunday, right?

And if you want to hang out in the replies below: tell me your predictions for languages used!? Will Zig see a significant uptake? Does Rust have a shot at overtaking Python? How much more will Uiua climb? How many users will Lean see in 2026?
r/adventofcode • u/ThunderChaser • 15h ago
Other A Rust-only private leaderboard
I'm starting a Rust private leaderboard for this year's Advent of Code! Whether you're a seasoned Rust developer or learning the language for the first time, you're welcome to join.
The leaderboard has few simple rules:
- Solutions must be written in Rust.
- External crates, custom harnesses, prewritten utilities, and nightly Rust are all permitted.
- No vibe solving. Solutions must be human-written, not generated by LLMs.
- Ideally, sign in with GitHub and publish your solutions in a public repository so we can learn from each other's approaches.
There's no expectation that you solve every puzzle or compete for the fastest times. This is primarily about having fun, writing Rust, and sharing interesting solutions.
Private leaderboard code: 2492408-7fab9ea4 Leaderboard link
r/adventofcode • u/careyi4 • 9h ago
Visualization [2026 Day 1] Animation written in Rust with Celluloid
Crate for the animation: https://crates.io/crates/celluloid-core
r/adventofcode • u/henriupton99 • 10h ago
Repo [Python repo] - toolkit for AOC daily retrieval/submission
Every year you probably do the same as me : open the puzzle, copy the input into a file, make the folder, solve, then switch back to the browser to submit. Since several years, I improve the whole loop into a python cli.
pulls the statement into a README, the example into test_input.txt, the real input into real_input.txt, and drops a solution template next to them.
When part 1 is accepted it re-fetches the page so the part 2 statement gets appended to the README. Answers land in the clipboard too. It follows the automation guidelines (identifying User-Agent, no request unless you actually run a command), and real inputs are gitignored so none of AoC's data ends up public.
https://github.com/henriupton99/AdventOfCode
Hope it could help ! Feedback welcome !
Have a good AOC :)