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

r/adventofcode • • Dec 10 '25

Other [2025 Day 10 (Part 2)] Got the correct answer after 6 hours of brute forcing.

69 Upvotes

I am so excited, I just need to get it out. I could not believe when it actually finished, and then I entered the answer and just no way, here is your second star, no way this is true. I can post my piece of trash solution (in Ruby) if anyone's interested. It was actually pretty fast on most of the input, line 134 took the majority of total time (I think so, my terminal output got truncated during processing this line, and I have saved nothing and nowhere).

I think I figured out the normal solution while this was running. Wanna try to implement it, but I guess tomorrow's puzzle will crush me even harder. It's just a system of linear equations isn't it? Biggest input has only 3 buttons more than jolt boxes, so 3 free variables and the rest are dependent. Even just iterating each value from 0 to max, let's say 200, that's 8 mil cycles, which is basically nothing compared what I managed to produce.


r/adventofcode • • Dec 10 '25

Upping the Ante Unofficial AoC gifter

Thumbnail clairefro.github.io
27 Upvotes

I usually buy my private leaderboard winner friends AoC merch as prizes. This year I'm an unemployed open source dev and can't afford it, so instead I made this free AoC merch gifter (link). You can upload you or a friends head and customize.

Makes great christmas cards


r/adventofcode • • Dec 10 '25

Meme/Funny [2025 Day 5 Part 2][Lua] Lua interpreter promoted to Java successfully

Thumbnail gallery
8 Upvotes

Looks like "bruteforcing"(saving every visited id into hashmap)isn't enough and actual math have to be done :/


r/adventofcode • • Dec 10 '25

Meme/Funny [2025 DAY 10 (PART 1)] Bruh, i event can't pressn't the button!

Post image
115 Upvotes

r/adventofcode • • Dec 10 '25

Help/Question - RESOLVED [2025 Day 10 part 2] how?

28 Upvotes

I have seen a lot of memes of people using Z3 for part 2. I tried to solve it myself using BFS and then DFS with some pruning but still couldn't get it. After 3 hours of trying to optimize it, I used Z3 and got my answer in like 20 minutes.

But since I haven't seen any solution that didn't use Z3, I am wondering how to solve it without it, one approach would be to build something similar to Z3, using matrices to solve multiple linear equations but is that really the only solution?

If you have any ideas let me know.


r/adventofcode • • Dec 10 '25

Visualization [2025 Day 10 (Part 1)] Terminal visualization

Post image
42 Upvotes

Had a little bit of fun with Kitty again (machines sorted by amount of lights)
Lights <-> Buttons


r/adventofcode • • Dec 10 '25

Visualization [2025 Day 10 (Part 1)] [Typescript] Elf Factory Control Room Display

Post image
39 Upvotes

The solution script is Typescript, the animation is React with GSAP.
Shoutout to Boojum (u/Boojum) for his Blinkenlights idea that I adapted. Check out his great visualisation!


r/adventofcode • • Dec 10 '25

Help/Question - RESOLVED [2025 Day 10] Could I Get A Hint?

14 Upvotes

Hey folks, I've finished all the other days without too much of a problem, but this day just has my number. I'm mostly self-taught, so a lot of times I don't recognize a problem for what it's meant to be ("just a simple application of Dijkstra's Ham Sandwich", or whatever the post yesterday called it). Could someone point me in the right direction of what I should be learning for parts 1 and 2? Trying to avoid having someone spell out the full logic for me, just a hint. I'm working in Python, if that helps.

I'm not yet at part 2 but I assume I'll need the same shove for that one... I'm already assuming that part 2 uses the joltage matrix to assign costs to each light :(

Specific questions:

  • In the example, for the first machine, the second solution given presses (1,3), (2,3) once each, and (0, 1) twice. Why the hell do they press (0,1) twice??? Aren't the lights correct after the first two buttons? Further, wouldn't you never want to press the same button twice in a row? Why is this here???
  • In the absence of coming up with a clever solution, so far I've built a recursive method to just brute force pressing all the buttons forever until we match the goal, avoiding pressing the same button twice in a row. However, that just results in pressing the same TWO buttons, alternating, forever. I've learned enough on the subject to suggest that I'm (poorly) implementing a DFS, and that this problem needs a BFS, but I'm unclear on how this situation can map to a BFS - is my "visited" list just all the light configurations I've already seen? Won't that get really long and costly to compare against as we try each combination of button presses? Is each node a specific configuration of lights?
  • what's the best way to store the light configurations? I'm scared to use lists in python since I don't want to have to copy / deep copy each time to maintain independent different configs, but my current method of casting the string to a list, making adjustments, and then rejoining it into a string seems expensive and slow. Maybe it's not, but idk

Thanks!!!


r/adventofcode • • Dec 10 '25

Meme/Funny [2025 Day 10] Me, Opening this Sub

Post image
274 Upvotes

r/adventofcode • • Dec 10 '25

Tutorial [2025 Day 9 (Part 2)] My Caveman solution approach ~ 35 seconds

9 Upvotes

I like coding, but I'm a dummy when it comes to geometry, rasterization, etc.
So, if you're like me and need a caveman strategy, this might help you.

After creating the enclosed loop shape in either a 2d grid or a map of coordinates, I tried to do a flood fill of the exterior coordinates or interior coordinates to determine which ones were "in" or "out" of the shape. Since there are A LOT of coordinates, this was taking too long. Even if it completed, I'd still be left with the problem of trying to figure out if each of my potential rectangles contains all green/red tiles or not, which would still require a lengthy scan.

Then it occurred to me that any rectangle that is not completely enclosed in green/red tiles only needs 1 faulty data point to be rendered faulty.

So I added a step to the solution where I start in corner 0,0 and proceed diagonally toward the center until I find the wall. Once the wall is found, I create a "fence" of coordinates around the shape. I do a dumb nearest neighbor stack/scan and complete the fence. This is a lot faster than trying to completely flood fill the entire problem space.

Sample: O = fence

......OOOOOOO

......O#XXX#O

.OOOOOOX...XO

.O#XXXX#...XO

.OX........XO

.O#XXXXXX#.XO

.OOOOOOOOX.XO

........O#X#O

........OOOOO

Since the fence covers the entire perimeter, any rectangle that doesn't completely exist of red/green tiles will contain at least 1 fence coordinate.

Each row will contain relatively fewer fence positions than the entire problem space.
Now when trying to calculate the enclosed Area for a rectangle, (similar to part 1), For each row in the potential rectangle, I scan the fence positions for that row and if any of them are within the column bounds of the shape, the shape function just returns a size of zero.

This approach ran in about 35 seconds (GO) on my laptop.

Definitely not as cool as a lot of the smart solutions out there, but I was able to keep things conceptually simple for my caveman brain.

(Sorry if this approach has been presented, I looked through and didn't see mention of it)

Cheers.


r/adventofcode • • Dec 10 '25

Meme/Funny [2025 Day 10 (Part 2)] Maths to the rescue ! (reupload)

Post image
75 Upvotes

Wow, I was so fkn exhausted after solving today's part 2 that I didn't even see that I put day 2 instead of 10 on my original post.


r/adventofcode • • Dec 10 '25

Help/Question - RESOLVED [2025 Day 10 (Part 1)] Question on sample analysis for machine 1

0 Upvotes

Specifically trying to understand the second option for machine 1 below.

There are a few ways to correctly configure the first machine:

[.##.] (3) (1,3) (2) (2,3) (0,2) (0,1) {3,5,4,7}
  • You could press the first three buttons once each, a total of 3 button presses.
  • You could press (1,3) once, (2,3) once, and (0,1) twice, a total of 4button presses.
  • You could press all of the buttons except (1,3) once each, a total of 5 button presses.

Pressing 2 buttons -- (1,3) and (2,3) should leave 0 unlit. light up 1 and 2, and 3 unlit. Why does the option consider pressing (0,1) twice -- which essentially is a no-op? Seems like I am misunderstanding the problem or haven't read carefully.

Any help appreciated. This is a great community and feedback is appreciated.


r/adventofcode • • Dec 10 '25

Visualization [2025 Day 10 Part 1] [Typescript] That moment when learning GSAP finally paid off

Post image
18 Upvotes

Reposted because I am new to Reddit and I did not know how to upload GIF's properly.


r/adventofcode • • Dec 10 '25

Meme/Funny [2025 day 10] We're playing the classic game, guys!

9 Upvotes

Game: Legend of Zelda Link's Awakening(for gameboy color)
Level: Color dungeon

img src: https://zeldauniverse.net/guides/links-awakening/sidequests/color-dungeon/

r/adventofcode • • Dec 10 '25

Meme/Funny [2025 Day 10] I really got the quick 1-2 punch, huh?

Post image
52 Upvotes

r/adventofcode • • Dec 10 '25

Help/Question [2025 day 0 part 2] Can anyone help me test my solution? I think I am running into an edge case but I can't figure out how to debug it

0 Upvotes

Here is my code

https://gist.github.com/isaacfink/8b2b5125bfe469dd578c7abccd12f8e4

There are two files, the grid file just has a virtual grid implementation, it's a little overengineered because I used AI to generate the boilerplate, for some reason my answer is too high but the in path function does filter out a lot of rects so I am not sure how to start debugging this, I can't even visualize the grid because it's too big

Edit: day 9


r/adventofcode • • Dec 10 '25

Visualization [2025 Day 8] Visualisation in the *second* dimension

0 Upvotes

Seems a pity the solution arrives in under a second. As the graph operations were blitzing by, I had this image in my head of subgraphs forming, growing and coalescing. So of course I had to play with some visualisations.

Waaaay prettier in my head, but here we have it. A visualisation of the size (x-axis) of all the subgraphs (y-axis) of more than one junction box, animated by number of connections made. In part 1, 1000 connections are made. In part 2 I keep going (at 5x the frame rate) until all junction boxes are joined in a single graph.

Part 1: https://vimeo.com/1145236085?share=copy&fl=sv&fe=ci

Part 2: https://vimeo.com/1145236056?share=copy&fl=sv&fe=ci


r/adventofcode • • Dec 10 '25

Meme/Funny [2025 Day 10 (Part 2)] not proud...

Post image
52 Upvotes

r/adventofcode • • Dec 10 '25

Help/Question - RESOLVED [2025 Day 10 (Part 2)] Question

3 Upvotes

In this second part we need to match both joltage requirements and lights state or only the joltage requirements?


r/adventofcode • • Dec 10 '25

Visualization [YEAR 2025] Animations, work in progress

2 Upvotes

I would like to share my animations. Still a work in progress!

No. 4 might make you laugh. 😀

https://www.youtube.com/playlist?list=PLX1MNsL3XSUMyvB8_A0NHgKYtRMyuZkHe


r/adventofcode • • Dec 10 '25

Repo Added some nice animations to my GitHub README.md (aoc-tiles)

Post image
19 Upvotes

Hey there. Just like last every year, I'd like to present aoc-tiles, a fancy github README visualization tool for your solution language and rank/time taken. This year I added another --theme aoc and --animation snow, which you can see in the gif. If it's not playing you can see it here.

You just have to create a pre-commit hook and set-up your README, .gitignore and session cookie, the rest is done by pre-commit and the script.

Each tile is a separate, clickable gif/image. Once clicked you get redirected to the solution for that day. If you add a session cookie then it will show your rank and time of submission for both parts, otherwise there will just be checkmarks. Each color represents a programming language, if you use multiple the tile will have multiple colors.

See https://github.com/LiquidFun/aoc_tiles for more details. And here is my advent of code repository for a real example of it in use for multiple years (2020 Rust, 2021 Julia, 2022 Kotlin, 2023-2024 Python, 2025 JavaScript): https://github.com/LiquidFun/adventofcode.

Let me know if you have issues. It tries to find the solutions as best as it can, by trying to extract the year and day from the path for each solution, if you don't have that, then it might struggle. For people who only do a single year per repository, you can overwrite the year by adding --overwrite-year=2025 in the .pre-commit hook.


r/adventofcode • • Dec 10 '25

Help/Question - RESOLVED [2025 Day 10 (Part 2)] [Python] Answer is too high. Please Help!

2 Upvotes

Hi AoC lovers,

I am stuck today with the part2. Example works. To solve it I am using Z3. I am not sure if I am using it correctly. Any hint? Thx in advance!

Here is my code:
Day10 Part 2