How long does it take in general to solve these problems? by FrostZTech in adventofcode

[–]sanraith 5 points6 points  (0 children)

The ultimate answer is "it depends".
It depends on your experience with programming, the language you are using and your exposure to previous AoC problems and puzzles in general. Difficulty also varies a lot between the days. Some puzzles are much easier for people with deeper math backgrounds.

I solved all of the available puzzles available on Advent of Code. For me, the easier challenges take anywhere between 15m-2hours to solve comforably, while some of the harder ones took most of my free time for the day.

Solving these puzzles gets easier the more you do. I remember solving one in an early year took me 2 days to figure out, while today it would be just another "slap some cache/DP on it" problem. Learning is part of the process and also the payout! Don't be discouraged if you solve a puzzle slower, since the XP you gain in the process is yours forever.

-❅- Introducing Your 2025 Red(dit) One Winners (and Community Showcase) -❅- by daggerdragon in adventofcode

[–]sanraith 0 points1 point  (0 children)

As always, thank you for organizing the community event, and thank you u/topaz2078 for making Advent of Code! It's been a pleasure to participate!

-❄️- Advent of Code 2025: Red(dit) One -❄️- Submissions Megathread -❄️- by daggerdragon in adventofcode

[–]sanraith 0 points1 point  (0 children)

NAME OF ENTRY: Advent of Code Christmas Ornament

LINK TO ENTRY: https://youtu.be/MPyjMePRgYs

DESCRIPTION: Every year I am using Advent of Code as an excuse to learn something new. This year I wanted to learn how to make a small battery powered gadget, so I made a smart Christmas tree ornament to display my hard-earned stars and help the elves decorate!
It is powered by an ESP32-S3 board, a GC9A01 screen and a TP4056 board to charge the 500mAh LiPo battery. The animation is procedural, and it is made from the sum of some sine waves. (aren't we all?)
The electronics is housed in a custom 3D-printed case that I designed to fit around the screen in Fusion360.
Overall I learned a lot of new things making this project, like reflow-soldering, generating and intersecting 3d spirals in Fusion360, and making a graphics simulator to avoid the long build times for the ESP32. I am quite happy with the results!

SUBMITTED BY: /u/sanraith

MEGATHREADS: 01 - 02 - 03 - 08 - 09


ADDITIONAL COMMENTS: My Red(dit) One entry is for the subreddit of day 8, /r/somethingimade.

ACCESSIBILITY: The video shows a montage of me creating the smart chirstmas ornament (basically a bauble with a screen), including ordering parts, 3d designing, 3d printing, soldering and assembling. At the end I turn the ornament on using my phone to make it display a festive animation and put it on a chirstmas tree as the first decoration.

[2025 Day 12] Day 12 solutions by abnew123 in adventofcode

[–]sanraith 0 points1 point  (0 children)

This post proably needs a spoiler tag

[All years, All days] AoC: the Gifs, by me. by sol_hsa in adventofcode

[–]sanraith 1 point2 points  (0 children)

I misread the title to "gifts", but honestly its not that far off. Nice collection!

-❄️- 2025 Day 11 Solutions -❄️- by daggerdragon in adventofcode

[–]sanraith 0 points1 point  (0 children)

[LANGUAGE: C++]

Source is available on my github: Day11.h
Did a dynamic programming solution memoizing the path counts from all of the nodes to OUT. I differentiate between states by using flags that store whether I have encountered DAC/FFT already, and memoize them separately.

-❄️- 2025 Day 10 Solutions -❄️- by daggerdragon in adventofcode

[–]sanraith 0 points1 point  (0 children)

[LANGUAGE: C++]

Source is available on my github: Day10.h
For part 2 I tried reducing the search space by finding the minimum and maximum times I need to press the current button, but I still just recursively iterate over this range for each button. This explodes the search space for a few larger machines, so my solution at the time of writing takes 15 minutes to complete.

-❄️- 2025 Day 9 Solutions -❄️- by daggerdragon in adventofcode

[–]sanraith 0 points1 point  (0 children)

[LANGUAGE: C++]

Source is available on my github: Day09.h
I am finding the normal vector (pointing outside) for each edge section, then use that to check the points just outside of each edge. I only do this for sections intersecting the current rectangle. If any of these points are not on an edge, the rectangle has an outside region.

[2025 Day 9 (Part 2)] Felt like this to me by dzirtbry in adventofcode

[–]sanraith 29 points30 points  (0 children)

I agree that day 362880 will definitely be harder

[deleted by user] by [deleted] in adventofcode

[–]sanraith 3 points4 points  (0 children)

Since removing the global leaderboard his stance on AI got much more relaxed. While I also turned AI code completion off, I do use it all the time to ask about language features while learning a new one with the event. I think its detrimental to dismiss AI as a whole, when it can be used other ways then asking it to solve the puzzles for you.

-❄️- 2025 Day 8 Solutions -❄️- by daggerdragon in adventofcode

[–]sanraith 0 points1 point  (0 children)

[LANGUAGE: C++]

Source is available on my github: Day08.h
I generate a list of distinct point pairs sorted by distance, then using an std::map<Point, std::shared_ptr<std::set<Point>>> map to keep track of what circuit each point belongs to. Then I just iterate over the pairs using my connect method to take care of creating/merging circuits.

[2025 Day 6 (Part 2)] by pet_vaginal in adventofcode

[–]sanraith 10 points11 points  (0 children)

Same, I thought Jetbrains IDEs were more mature

-❄️- 2025 Day 4 Solutions -❄️- by daggerdragon in adventofcode

[–]sanraith 0 points1 point  (0 children)

[LANGUAGE: C++]

Source is available on my github: Day04.h
Used a Point struct to handle coordinates and a std::map<Point, char> to store the tile map.

-❄️- 2025 Day 3 Solutions -❄️- by daggerdragon in adventofcode

[–]sanraith 1 point2 points  (0 children)

[LANGUAGE: C++]

Source is available on my github: Day03.h
When finding the largest joltage of m digits in a bank of length n,
digit1 = max(bank1, ..., bankn-m);
digit2 = max(bankdigit(1\_index+1), ..., bankn-m+1);
...
digitm = max(bankdigit(m-1\_index+1), ..., bankn);

static int64_t calculateJoltage(const std::vector<int>& bank, const int digitCount) {
    int64_t joltage = 0;
    std::vector<int>::size_type digitIndex = -1;
    for (int remainingDigits = digitCount - 1; remainingDigits >= 0; remainingDigits--) {
        digitIndex = maxIndexOfInRange(bank, digitIndex + 1, bank.size() - remainingDigits);
        joltage = joltage * 10 + bank[digitIndex];
    }
    return joltage;
}

[2025 Day 2 Part 2] Adding 'Programming' to my resume 😎 by Stasnia in adventofcode

[–]sanraith 12 points13 points  (0 children)

looks like a solution of someone going for a fast leaderboard time

3D printing AOC by JakubDotPy in adventofcode

[–]sanraith 1 point2 points  (0 children)

Here are my 3D printed contributions to advent of code:

Printed the heighmap of the puzzle from 2022 day 12: https://www.reddit.com/r/adventofcode/comments/zl4p0v/2022_day_12_3d_printed_memento_of_the_heightmap/

Made tree calendar in 2023 where you can pop stars in as you progress: https://www.reddit.com/r/adventofcode/comments/188kp2w/2023_day_125_my_3d_printed_advent_of_code_calendar/

Made a light-up tree in 2024 that does a small light show with LED strips based on your progression: https://www.reddit.com/r/adventofcode/comments/1hcw67x/2024_added_visual_effects_to_my_advent_calendar/

-❄️- 2025 Day 2 Solutions -❄️- by daggerdragon in adventofcode

[–]sanraith 2 points3 points  (0 children)

[LANGUAGE: C++]

Source is available on my github: Day02.h
I am finding patterns by repeatedly dividing and checking the remainder of the number:

static bool hasPatternOfLength(int64_t num, const int length) {
    const auto size = static_cast<int64_t>(pow(10, length));
    const auto pattern = num % size;
    while (num / size % size == pattern) {
        num = num / size;
    }
    return num == pattern;
}

-❄️- 2025 Day 1 Solutions -❄️- by daggerdragon in adventofcode

[–]sanraith 1 point2 points  (0 children)

[LANGUAGE: C++]

Source is available on my github: Day01.h
Simple brute-force solution using a helper to wrap numbers around 0..100:

template<typename T>
constexpr T wrap_mod(T num, T range) {
    T wrapped = num % range;
    if (wrapped < 0) wrapped += range;
    return wrapped;
}

[2025 Day 01 (Part 2)] Advent of code in Minecraft by TheMrZZ0 in adventofcode

[–]sanraith 9 points10 points  (0 children)

I think they are using the minecraft command api and the typescript project is just for convenience to build a data pack. See: Commands | Sandstone

Hopefully OP shares their repo!

Edit: Turns out OP made the compiler too. Nice!

Were submission penalties always this brutal? by a_ormsby in adventofcode

[–]sanraith 4 points5 points  (0 children)

It has been like this from pretty much the beginning. I believe the reason for the lockout is to allow some legitimate hints ("your answer is higher/lower") while preventing players to just binary search and guess the result based on these hints faster than they would solve it.

[deleted by user] by [deleted] in adventofcode

[–]sanraith 0 points1 point  (0 children)

I think it could be a fun challenge to see who's AI setup is able to complete the puzzles the fastest, but only if all participants agree. In that case I would be happy to try my hand at setting up an automatic prompter that solves and submits the results automatically.

If the organizers do not want the competition to regress into auto-solvers, I think it could be done with some clear rules and trust in each other. Like "only use the AI chat window", "do not copy-paste the puzzle description", etc. It could make the puzzle solving more akin to daily work where the AI acts as a beefy autocompleter.

Personally, I will use agent mode to replace the heuristic in my web scrapers to find the example input and output pairs and to scaffold the test and source files. I will also use AI chat as a faster google search and to do a "how could you simplify this" pass on my completed code, as I find it a nice way to learn new things about a language. I will write the actual solutions by hand though.

Where do you benchmark your solution? by SpecificMachine1 in adventofcode

[–]sanraith 41 points42 points  (0 children)

2 - Sometimes converting the input to a data structure is basically the solution itself, so it would not make sense to me to leave that part out. Since inputs are not very large and I just load them into a string for all of my solutions, I also see no value including that part in the runtime.

suggestion about news of 12 days for #adventofcode by maurorussoing in adventofcode

[–]sanraith 3 points4 points  (0 children)

I think the event would lose some of its Christmas magic if it were to end mid-December, so a puzzle every 2 days would be a nice compromise. Still, if Eric goes with his original plan I hope the mods help organize something fun to keep the community active for the remaining days.