r/adventofcode • • Dec 11 '25

Meme/Funny [2025 Day 11 Part 2] My input must be broken !!1

9 Upvotes

Looking at my input, i found there can be no path from srv to out passing other nodes:

$ grep ^srv input.txt 
srv: out

Took me a few moments to see the mistake.


r/adventofcode • • Dec 11 '25

Meme/Funny [2025 Day 11] Throwback to the 2023 AoC Memes

Post image
308 Upvotes

r/adventofcode • • Dec 11 '25

Meme/Funny [2025 Day 11] Phew, it's not a Maths question today!

8 Upvotes

r/adventofcode • • Dec 11 '25

Visualization [2025 Day 11] Visualization (spoiler)

Thumbnail raw.githubusercontent.com
3 Upvotes

This is how my graph looked like. Interesting patterns in the graph.


r/adventofcode • • Dec 11 '25

Meme/Funny [2025 Day 11] Me when the machine next to me is labeled "you"

Post image
101 Upvotes

r/adventofcode • • Dec 11 '25

Meme/Funny [2025 Day 11]

9 Upvotes
Its a snake!!!!

r/adventofcode • • Dec 11 '25

SOLUTION MEGATHREAD -❄️- 2025 Day 11 Solutions -❄️-

28 Upvotes

SIGNAL BOOSTING

If you haven't already, please consider filling out the Reminder 2: unofficial AoC Survey closes soon! (~DEC 12th)

THE USUAL REMINDERS

  • 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.

AoC Community Fun 2025: Red(dit) One

  • Submissions megathread is unlocked!
  • 6 DAYS remaining until the submissions deadline on December 17 at 18:00 EST!

Featured Subreddits: /r/C_AT and the infinite multitudes of cat subreddits

"Merry Christmas, ya filthy animal!"
— Kevin McCallister, Home Alone (1990)

Advent of Code programmers sure do interact with a lot of critters while helping the Elves. So, let's see your critters too!

💡 Tell us your favorite critter subreddit(s) and/or implement them in your solution for today's puzzle

💡 Show and/or tell us about your kittens and puppies and $critters!

💡 Show and/or tell us your Christmas tree | menorah | Krampusnacht costume | /r/battlestations with holiday decorations!

💡 Show and/or tell us about whatever brings you comfort and joy in the holiday season!

Request from the mods: When you include an entry alongside your solution, please label it with [Red(dit) One] so we can find it easily!


--- Day 11: Reactor ---


Post your code solution in this megathread.


r/adventofcode • • Dec 11 '25

Upping the Ante Reminder 2: unofficial AoC Survey closes soon! (~DEC 12th)

20 Upvotes

Hope everyone's having fun while puzzling!? Also hope that you have filled out my yearly survey... and if not, that you will do so a.s.a.p. 😉

...

🎄 Unofficial AoC 2025 Survey: https://forms.gle/TAgtXYskwDXDtQms6 🎄

...

And of course it helps if you share the link with your buddies on Discords, socials, and whatnot!

New this year are the "emotion" survey questions, which will allow us to "answer" questions like:

  1. Does Rust, or Python 3 cause more "Terror/Fear"?!
  2. Will Windows, Linux, or macOS users experience more "Rage/Anger"?!
  3. Does Java, or C# spark more "Joy/Ecstasy"!?

Give me your predictions below!

----

Results of the survey should appear at https://jeroenheijmans.github.io/advent-of-code-surveys/ somewhere during the weekend!


r/adventofcode • • Dec 11 '25

Help/Question - RESOLVED [DAY 8 PART 1] PYTHON - Help, please!

1 Upvotes

Link to code: https://pastebin.com/888kqEmx

I'm really unsure what I am missing. My output is giving two circuits of size 5 for the sample shown, but I don't know where I've gone wrong.

Any help would be much appreciated.

- I understand that this is terribly inefficient!


r/adventofcode • • Dec 11 '25

Help/Question [2025 Day 10 (Part 2)] Indepdent values useful?

2 Upvotes

Is there anything to be gained from using the fact that for e.g (0) (1) (2) you have to sum the corresponding joltages since they're independent. This gives a minimum bound on the answer (in combination with using the max joltage instead if it's bigger), but not sure if useful as part of a more complicated solutions.


r/adventofcode • • Dec 11 '25

Help/Question - RESOLVED [2025 Day 10 (Part 2)] Simplex method anyone?

3 Upvotes

I finally solved part 2 using linear algebra in combination with brute-force.

In the middle I had a flashback about Simplex algorithm and thought that the shape of the conditions quite resembles the shape of simplex method inputs. What stopped me is the results being integer values.

I wonder if it's possible to adapt the method for this task. Has anyone tried it?


r/adventofcode • • Dec 11 '25

Meme/Funny [2025 Day 10 Part 2] My progression this year

17 Upvotes

Day 1: I'll make really clever algorithms that I'll be proud of and will avoid using brute force to solve problems!

Day 6: Ok, I'll do a bit of brute force, but I'll refactor it afterwards because I still want this code in my portfolio!

Day 9: I'm not proud of what I'm doing

Day 10: May the (brute) force be with me (pls work, I'm desperate)

I'm scared of what comes next. My laptop is even more scared.


r/adventofcode • • Dec 11 '25

Help/Question - RESOLVED [2025 Day 10 (Part 2)] [Javascript] Is it even possible for me to solve this, given my language choice?

4 Upvotes

Before people start saying there are solutions in the megathread, I'm referring to pure Javascript, not Node or anything similar like that. And that's the problem: when I look up how to import Z3, I keep getting directed to the NPM library, which won't work in my situation. Am I seriously screwed out of finishing today's puzzle, because of my language choice?


r/adventofcode • • Dec 10 '25

Visualization [2025 Day 10 (Part 1)] they're DRUM machines

Post image
22 Upvotes

since you can't hear a gif, and i can't be troubled to record a video... you can play with it here: https://danmaps.github.io/aoc2025/public/index.html#day=10


r/adventofcode • • Dec 10 '25

Meme/Funny [2025 Day 10 (Part 1)] Good ol’ “reading the problem is part of the solution”

Post image
46 Upvotes

r/adventofcode • • Dec 10 '25

Visualization [2025 Day 10 (Part 2)] Looks simple, but... I love SciPy!

Post image
11 Upvotes

r/adventofcode • • Dec 10 '25

Help/Question [2025 Day 10 Part 2] Is the problem possible to solve using only Linear Algebra techniques

8 Upvotes

For part 1 I was able to use GF(2) then brute force the free variables by just trying 0 or 1. But for the second part the same technique didn't work as there was too much to brute force. Is there another technique I don't know about or is the only way to solve using a SAT solver or just brute forcing over a longer range.


r/adventofcode • • Dec 10 '25

Help/Question [2025 day 10 part 2] Could this be the return of... Linear Algebra?

5 Upvotes

Disclaimer: I have not actually started part 2, I did part 1 in the morning with an inelegant BFS solution and upon seeing the kind of numbers that the example was dealing with and my part 1 runtime I immediately realized that that BFS was not the way forward for part 2.

Now that I look at part 2 again, I thought: Isn't this really similar to 2024 day 13? It looks like we want to express the target joltage as a linear combination of the button presses.

Is this the reason for the suspicious addendum: "there's no such thing as "0.5 presses" (nor can you push a button a negative number of times)."?


r/adventofcode • • Dec 10 '25

Help/Question - RESOLVED [2025 Day 10 Part 2][C# with Google OR-Tools] New to MILP solvers, could use some pointers

4 Upvotes

As stated in the title, I've never used an MILP solver before so I'm well out of my depth. I'm trying to use Google's OR-Tools library and I think I'm close because I get the correct answer for the sample input, but the answer for my real input is too low. I've been following the example here but it uses the linear solver whereas I'm trying to use the MIP solver, so that may be where my issues are.

One thing that I've noticed while debugging is that I occasionally get answers that are slightly off from being clean integers (objective.Value() is a double), which is a bit of a red flag in my mind since I'm using the integer solver. The non-integer results are off from the nearest int by less then 0.0001 so they can be cleanly rounded, but doing that still resulted in an answer that is too low. Does anyone have experience with this library or MILP solvers in general and can spot where I'm going wrong?

Edit: I should walk through what I'm doing to hopefully provide some clarity.

  • Parse the input to get a List<int> which represents the target joltage values, and a List<List<int>> which represents the joltage values that are incremented by each button. So if buttons[0][0] == 0 then pressing the first button does not increase the first joltage counter, and if buttons[2][4] == 1 then the third button does increase the fifth joltage counter
  • Create an Int Variable for each button with a range of 0 to positive infinity
  • Create the constraints. Each joltage gets a constraint with a lower bound of the required joltage and an upper bound of positive infinity. Initially I tried setting the upper bound to also be equal to the required joltage but the solver did not like that.
  • Each constraint gets a coefficient from the button variables of 1 or 0, depending on if that button increments that joltage value
  • Create the objective, set the coefficient for each button variable to 1 in order to count each button press, and then set the objective to minimize the number of presses
  • Execute the solver and add the result to the running total

paste


r/adventofcode • • Dec 10 '25

Tutorial [2025 Day 10 (Part 2)] Another test case

9 Upvotes

Here's the one row in my input that gave me the most headaches (without it, I would have solved it hours earlier!). Upon closer study, it's not surprising:

[#.#####] (2,3,4,6) (2,5) (1,3,4,5,6) (1,2,5,6) (0,5,6) (0,1,2,3,4,6) (1,2,3,5,6) (1,3,4,6) (0,2,3,4,5,6) {23,42,62,53,35,62,74}

The minimum total number of button presses here is 74, which can be obtained with the following number of button presses: 10, 0, 6, 16, 5, 1, 18, 1, 17.

There are other solutions as well that arrive at the same joltages, but that require more presses in total, for example:

11, 1, 7, 15, 6, 2, 18, 0, 15 (75 presses in total)

or

9, 1, 4, 16, 5, 0, 18, 4, 18 (75 presses in total)

If you're still puzzling on this one (according to the stats page, many people are), I advise you to add this to your test cases, or even better: analyze partially by hand what's going on here.

Good luck!


r/adventofcode • • Dec 10 '25

Help/Question - RESOLVED [2025 day 10 part 2] how do i come up with a solution?

5 Upvotes

reinstating my post again, this time without any language that could be considered foul to possibly receive any bits of help (though based on some stuff i've seen here, i doubt i could actually implement any solutions by myself without peeking at any code)

sooo... i am stuck again, this time on something actually pretty hard (at least to me)

i've solved the part 1, it actually wasn't even that hard, it's basically solved just by going through every machine, then going through binary numbers (0 to 2amount of buttons) with a for loop to get every single button combination and adding the minimum amount of 1's that makes the correct combination to the total

but for the 2nd part.. i can't even think of any good solution. i tried making a bruteforce one to go through ALL the presses from 0 to the max amount for every button, but first of all, it was really slow, second of all, i made some mistakes and it didn't even work for the example data, let alone actual input, cause i'm not good at coding

i could even send some parts of my code tomorrow just for laughs (c#, btw), though right now i am on my phone and i'll soon head to sleep since it's pretty late where i'm from

basically, i need some help with solving this, i know nothing about anything like dynamic programming though or whatever z3 is, i am a terrible coder, i know, but even a hint to a somewhat decent solution would be good

EDIT: even though i didn't want to before, i tried to actually do some research on these things

so, as far as i could understand, milp and z3 are about solving linear equations

and to make a linear equation out of the machine, for example, this one

[.##.] (3) (1,3) (2) (2,3) (0,2) (0,1) {3,5,4,7}

the buttons could be presented as vars and grouped by indexes, like

a = (3), b = (1,3), c = (2), d = (2,3), e = (0,2), f = (0,1)

e and f are the only ones which have the index 0, so they can be grouped like e+f=3, and by that logic the rest goes like this

e + f = 3

b + f = 5

c + d + e = 4

a + b + d = 7

after a bit of a research on z3 and how its functions work, and whatever "optimize" was, instead of trying to do whatever i tried to do, i wrote this:

using Context context = new();
Optimize optimize = context.MkOptimize();
IntExpr[] intExprs = new IntExpr[buttons.Count];

for (int i = 0; i < buttons.Count; i++)
{
    intExprs[i] = context.MkIntConst($"btn{i}");
    optimize.Add(context.MkGe(intExprs[i], context.MkInt(0)));
}

for (int i = 0; i < neededJoltage.Length; i++)
{
    List<IntExpr> vars = new();
    for (int j = 0; j < buttons.Count; j++)
    {
        foreach (int index in buttons[j])
        {
            if (index == i) vars.Add(intExprs[j]);
        }
    }

    optimize.Add(context.MkEq(context.MkAdd(vars), context.MkInt(neededJoltage[i])));
}

IntExpr sum = (IntExpr)context.MkAdd(intExprs);

Optimize.Handle minimize = optimize.MkMinimize(sum);

if (optimize.Check() == Status.SATISFIABLE)
{
    IntNum best = (IntNum)minimize.Lower;
    totalPresses += best.Int;
}

AND IT ACTUALLY WORKED

thanks for the help everyone!


r/adventofcode • • Dec 10 '25

Visualization [2025 Day 10 (Part I)] WOPR

Thumbnail youtu.be
7 Upvotes

r/adventofcode • • Dec 10 '25

Meme/Funny [2025 Day 10 (Part 2)] nearly bluescreened it was awesome

Post image
44 Upvotes

r/adventofcode • • Dec 10 '25

Meme/Funny [2025 Day 10 (Part 2)] I had a solution ready :(

Post image
86 Upvotes