Summary for those just joining us:
Advent of Code is an annual Christmas themed coding challenge that runs from December 1st until christmas. Each day the coding problems get progressively harder. We have a leaderboard and pretty good turnout, so feel free to hop in at any time and show your stuff!
Whether you have a single line monstrosity or a beautiful phone book sized stack of OOP code, you can export it in a nice little image for sharing at https://carbon.vercel.app
What did you think about today's problem?
Our Code is 2416137-393b284c (No need to share your profile, you have the option to join anonymously if you don't want us to see your github)
Jump in the discussion.
No email address required.
Doing a lookup for every integer was a mistake.
Jump in the discussion.
No email address required.
If you're going to brute force it you should at least do them one at a time instead of populating the whole list first lmao
Jump in the discussion.
No email address required.
More options
Context
Jump in the discussion.
No email address required.
More options
Context
That's why when you suspect that the orgs finna frick with you, you download the task data first. But on the other hand it seems to fit in 32bit ints, so like 32gb of memory should be enough.
Jump in the discussion.
No email address required.
More options
Context
More options
Context
advent of absolutely frick my shit up and make me feel r-slurred
Jump in the discussion.
No email address required.
finally had a drink and i cant even be fricked to read this shit. this year is going to be fricking miserable.
Jump in the discussion.
No email address required.
More options
Context
More options
Context
Hold onto your hats boys I'm doing multithreading for each range
Jump in the discussion.
No email address required.
More options
Context
Brute force method ended up resolving before I finished writing a more clever range splitting version.
Jump in the discussion.
No email address required.
More options
Context
Who is the mysterious
anonymous user #371225
?Finally, a task that rewards a meticulous programmer. Nothing particularly complicated, just be careful, think a little bit ahead, write maintainable (for the next 10 minutes) code. The important parts:
Jump in the discussion.
No email address required.
More options
Context
why do they make this shit as inscrutable as possible
Jump in the discussion.
No email address required.
I got tripped up that they did [target, source, range], these anti-AI measures suck.
Jump in the discussion.
No email address required.
More options
Context
To Dunk on ESLs
Jump in the discussion.
No email address required.
More options
Context
More options
Context
I ended up brute forcing a search for seed values that would cause a bug on the test data. Turns out that I forgot that ranges could completely encapsulate each other.
Jump in the discussion.
No email address required.
Yep I have a special case up the top because I forgot that entirely
Jump in the discussion.
No email address required.
More options
Context
More options
Context
Runs in an amazing 147 seconds.
Jump in the discussion.
No email address required.
More options
Context
Brute force indeed. Let's parallelize it:
This brings the runtime down from 5 minutes to 1 on my machine. Not bad.
@SleighOut
Jump in the discussion.
No email address required.
More options
Context
Virgin actually solving the problem vs chad seeing the lowest number with it's inverse in a range
Jump in the discussion.
No email address required.
I was so close to switching to a real maths library.
Jump in the discussion.
No email address required.
More options
Context
More options
Context
Babby's first intersecting lines algorithm (takes ~1 second on my machine)
Even so, this one is pretty tough for just day 5.
Jump in the discussion.
No email address required.
cniles on suicide watch
Jump in the discussion.
No email address required.
More options
Context
More options
Context
My code is definitely not pretty, but at those brute forcing solutions
Jump in the discussion.
No email address required.
More options
Context
This was awful, mostly my own fault, but I got my tricky version working. I know I could save a few iterations with less recursive calls and I flip-flopped between (base, size) and (min, max) a few times to try catch broken logic, but I'm not cleaning it up so you get to see all my shameful debugging and stanky code.
Jump in the discussion.
No email address required.
More options
Context
my solution is as as it comes because I don't know how to not bruteforce it and I'm too exhausted to figure out the proper way.
I noticed there was going to be a problem once I looked at the actual input file and realised just how big an array would be (no problem, iterator).
Jump in the discussion.
No email address required.
More options
Context
Luckily I had some old code lying around for range overlaps.
Jump in the discussion.
No email address required.
More options
Context
Part 2 was a bit of a b-word, largely because I'm tired and didn't want to put the effort in. RIP anyone trying to brute force that without any optimisation.
Jump in the discussion.
No email address required.
More options
Context
These range operations put me in a bad mood for the rest of the day.
Jump in the discussion.
No email address required.
More options
Context
Brute forced it in python . Took 2 hours and five minutes.
Jump in the discussion.
No email address required.
More options
Context
Part 2 kicked my butt. Spent hours trying to be clever and finally just brute forced it.
Jump in the discussion.
No email address required.
More options
Context
I managed to get a fast recursive solution working
Jump in the discussion.
No email address required.
More options
Context
Finally came up with something decent for part 2. Runs in 5ms
Jump in the discussion.
No email address required.
More options
Context
darn this one is really hard for me lol i don't think I'm gonna finish before the next puzzle comes out
Jump in the discussion.
No email address required.
More options
Context
Snapshots:
https://carbon.vercel.app:
ghostarchive.org
archive.org
archive.ph (click to archive)
https://adventofcode.com/2023:
ghostarchive.org
archive.org
archive.ph (click to archive)
Jump in the discussion.
No email address required.
More options
Context