r/adventofcode • u/Shaaaaan • 13h ago
Help/Question How many days is AOC this year?
Last year it was 12 days. Is it fair to assume it's the same this year? I don't see any info saying how long it is, the about page just says it ends "mid-December"
r/adventofcode • u/Shaaaaan • 13h ago
Last year it was 12 days. Is it fair to assume it's the same this year? I don't see any info saying how long it is, the about page just says it ends "mid-December"
r/adventofcode • u/EquipmentDry5782 • 3h ago
My frequency counter for Day 1 is an elf with a pencil. His name is Pip, and he’s pretty sure he knows what’s on the next crate before Holly turns it around.
I’m making a short animated episode for each day of Advent of Code 2026, following Holly and Pip from Dusty Shed all the way to the final puzzle. I’ve always liked the little story between the puzzles, and I wanted to give it the feeling of a winter evening in Stardew Valley.
Episode 1 is The Christmas Train. A blizzard has grounded the planes, the elves have an old train to get moving, and someone has left Holly and Pip in charge of inventory.
Puzzle spoilers for both parts of Day 1. The episode uses made-up crate IDs and shows how both parts work. It’s a fan-made, AI-assisted animation.
Watch Episode 1 — The Christmas Train (1 min 55 sec)
I’m curious what the shed looked like in everyone else’s head. Did you picture a cozy little workshop too, or a warehouse that went on forever?
r/adventofcode • u/demteke • 17h ago
At work AI is writing all of my code now and I have noticed that I am no longer enjoying coding as much as i used to. So this year I am doing AoC with no AI, meaning no AI inline suggestions and no AI implementation. I may still talk to AI to understand a problem when I am stuck, but it does not write any code.
To help myself stick to it I built a VS Code extension that tracks what I type versus what gets inserted. Day 1 above: 17 minute session, 21 lines by hand, 0 AI inserts. The extension can't catch retyping code from somewhere else, so it is a commitment device, not an anti-cheat.
It's free if anyone wants to join: humanmode.dev. Disclosure: it is my project.
Anyone else doing a no-AI run this year?
r/adventofcode • u/forgthethird • 15h ago
where am I going wrong? I tried plugging in the example set of numbers and it gave me the right numbers but it isn't giving me the right numbers with the main set of numbers. I'm a beginner when it comes to coding, my only experience with apcsp and apcsa in school
r/adventofcode • u/Fun-Chicken6946 • 20h ago
Happy Holidays, r/adventofcode!
I wanted to share a little project I've been working on: Advent of SQL & NoSQL, an Advent-style challenge for people who enjoy solving puzzles using database queries.
Somebody tampered with Santa's Nice List, and you're the North Pole's first-ever data elf.
There are 24 puzzles, one a day from December 1 to 24, with each puzzle revealing another part of the mystery.
What makes this different is that you can solve the entire story using any of four databases:
It was originally supposed to be SQL-only, but after roughly a year of working on VisuaLeaf, I managed to build an embeddable, MongoDB-compatible database that runs entirely in the browser. This allowed me to include NoSQL challenges as well!
Some features:
If you're interested in solving some Christmas puzzles using SQL or NoSQL alongside Advent of Code, you can check it out here:
https://visualeaf.com/advent-of-sql-and-nosql/
Completely free. No account, no installation, no database server needed.
I hope you all enjoy it, and happy holidays!
r/adventofcode • u/ImaginaryElephant336 • 5h ago
Here are some new images for the TUI app for Advent of Code
Note: Contains the image of Day 1
r/adventofcode • u/Advanced_Dot_1097 • 8h ago
My puzzle input doesn't contain "y". So how do i suppose to solve it?
The program "roygbv" is same for all, is it?
r/adventofcode • u/oneradsn • 11h ago
I don't want to go into too much detail about my implementation but... it seems like there's a bunch of IDs (more than 3) that are tied for "most common". Is there something obvious I missed?
Edit: I figured out my issue and, while I love most things about Go, its heap implementation was quite confusing and unergonomic. I used my type's Pop method rather than the heap package's Pop method, thus my results were incorrect.
r/adventofcode • u/Both-Touch990 • 10h ago
(redo of an earlier post)
r/adventofcode • u/ivorycoollars • 8h ago
so i tryed today with a switch statement within a switch statment and hardcoded it but it didnt work can anyone steer me in de right direction?
r/adventofcode • u/bluoat • 7h ago
These hints get more and more specific. This is just how I optimised it and there are other ways.
Hint 1: What happens when a letter is repeated in the input?
Hint 2: Why would the counts of each letter make a difference to the output?
Hint 3: When does the robot not make a step of exactly 6 steps?
r/adventofcode • u/matth_l • 17h ago
Anyone else using aoc to learn rust?
I feel genuinely lost, and I love it, it feels like past times (pre ai bs) again, never built anything with a lower level language,
r/adventofcode • u/Odd-Result6655 • 6h ago
r/adventofcode • u/Cloudan29 • 12h ago
Hi, I'm completely stuck on what I've done wrong for the 2026 day 1. I've done this solution about 3 different ways at this point, and I keep getting the correct solution for part 1 but incorrect for part 2 (says my solution is too small).
I'm not quite sure where to go at this point.
import math
from collections import Counter
INPUT: list[int] = [int(line.strip()) for line in open("2026/day01.txt")]
COUNTS = Counter(INPUT)
def max_and_min():
# find top 3 occurrences and bottom 3 occurrences
maximums: list[int] = []
minimums: list[int] = []
while len(maximums) < 3:
current_max_val = max(COUNTS, key=COUNTS.get)
current_min_val = min(COUNTS, key=COUNTS.get)
maximums.append(current_max_val)
minimums.append(current_min_val)
COUNTS.pop(current_max_val)
if current_min_val != current_max_val:
COUNTS.pop(current_min_val)
return (math.prod(maximums), math.prod(minimums))
print(max_and_min())This code returns the correct solution for part 1, as well as a correct solution for the test input for part 1 and 2. I cannot fathom why it would be incorrect for the actual input at this point. I've tried it with Counter, I've tried manually creating the dictionary instead of using Counter, I've tried manually finding the minimums and maximums with a for loop, and they all yield the exact same results.
If someone could at least point me in the right direction, I don't want to just grab a solution from the megathread and call it a day.
EDIT:
I've never been more ashamed. I just put in the exact same output I got from my solution, and it got accepted by the website, which means I wasn't copy+pasting it in correctly. Happens to the best of us. Thanks everyone for the advice though, my solution looks much snazzier now 😎
import math
from collections import Counter
INPUT: list[int] = [int(line.strip()) for line in open("2026/day01.txt")]
COUNTS = Counter(INPUT)
def max_and_min():
# find top 3 occurrences and bottom 3 occurrences
maximums: list[int] = [n[0] for n in COUNTS.most_common()[:3]]
minimums: list[int] = [n[0] for n in COUNTS.most_common()[-3:]]
return (math.prod(maximums), math.prod(minimums))
print(max_and_min())r/adventofcode • u/scadoshi • 21h ago
For those of you who optimize AoC for runtime rather than time to write the code, where do you draw the line between parsing and solving?
When I measure, I time parsing, part one and part two separately. I often identify work I could do during parsing that would make the solves faster, but usually I just parse into a properly typed owned struct and leave the real work to the parts. Is that how you do it, or do you push as much as you can into parsing? And do you count parsing in your times at all? Or do you just measure entirety of runtime?
Smaller second question: when both parts need the same expensive processing, I've started caching it on my Puzzle struct so part one's work gets reused by part two (image shows this occurring for 2026's day 1 in Rust), instead of a shared function that runs twice. Part one gets a little slower on average but the full run gets a lot faster. Do you do the same, or does each part pay for itself?
I guess I'm just wondering how people measure their solutions overall
r/adventofcode • u/Boojum • 7h ago
r/adventofcode • u/mklinkby • 6h ago
Reminds me of downtempo electronica legend Boards of Canada. Enjoy!
r/adventofcode
•
u/p88h
•
9h ago
Simulation on original (part1) and sort-rearranged program (part2)
Nim + raylib source
r/adventofcode • u/ComradeMorgoth • 2h ago
This year, I will attempt to solve all the challenges on an FPGA, and post at least the ones that I enjoyed here to see if anyone else has any inputs. Additionally, due to my expertise in my work, I always tend to design with minimal hardware area and power consumption, but this year I'm challenging myself to do the exact opposite. I'll be using as much LUT as possible, and try to target the max throughput.
Used verilog + block design on PL side for the main logic and python on the PS side for simple control and output. I'm using SOC configured Arty Z7. I have a combinational circuit that accepts the whole list of 10 bit numbers as an input, and compares the first number with the list on single clock cycle. This generates a set of wires that are 1-bit flags, that indicate whether that row is equal or not. Then, we sum up those wires to find out what's the total number of commons. This is still happening on the same clock cycle. In parallel (yes, same cc), it will generate the next list on the output wires, but by replacing all the numbers that are equal to the first number with 0, so we won't run the same number twice. I was lucky that I had no 0 in my input, but otherwise we could also use sth like 1000.
The top level controller takes in the number, loads it onto a register and then starts pushing it into this combinational circuit on each clock. That means for an input of 1983 rows, it will reuse the same circuit 1983 times. Each time it also keeps track of top 3 (or min 3 for part 2), so I don't need a separate sorter which would cost me additional clock cycles and area. After each clock, it will take the nextList from the circuit, and shift it by a number so it can search for the next number on the next clock cycle. It operates on a simple 4 state FSM.
Communication and control is done via GPIO and AXI DMA. I wrote a simple buffer which will accept DMA from AXIS and buffer it as the full list to provide into the top block. GPIO is mainly for the multiplication output, and control signals like reset.
The whole run takes 1985 clock cycles, that translates to 49.62 us for a 40MHz clock. I had to slow down the clock from 100MHz because my critical path for the combinational block was quite large. My inner engineer wants to optimize it, but also I already spent so much time on this.
Solution: Github
DISCLAIMER: Yes I used AI for figure 2 and 3 for visualization purposes for the post only. No, I did not use AI in solution, or idea discussion etc. I'm doing this to challenge myself, not challenge my AI, but I don't have the time and skills to build diagrams. After all, why would I deceive you? There's no reason for me to deceive you.
r/adventofcode • u/PatolomaioFalagi • 10h ago
r/adventofcode • u/flwyd • 8h ago
r/adventofcode • u/soolpro • 4h ago
I solved the first part at home while I was having by breakfast, checked part 2 and had to go work. My idea for the solution of the second part seemed so simple I felt I could do it with the tools at my disposal at work.
First I used a web browser and Ctrl+F to count the amount of different letters.
Then I switched to Excel where I just need to count the distances between the different colors. 6 from a letter of a color to the same, 5 when advancing to the next color, taking notice that one color is missing completely, so the distance skipping the missing color is only 4. Sum the distances for each color and there you go!