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.
My favorite days are when the thread goes up and nobody comments for like 2-3 hours that's when you know it's fun
Edit: I had a nice recursive solution that worked by shifting each group one slot at a time and completed the example basically instantly but it's still running as slow as brute force I'm going to kms![:marseyc#rygenocide:](https://i.rdrama.net/e/marseycry.webp)
Jump in the discussion.
No email address required.
Cache it and you're done
Jump in the discussion.
No email address required.
Yeah, saw everyone mentioning it but my code is on my work pc so I have to wait until I get into the office
Jump in the discussion.
No email address required.
More options
Context
found the incel
Jump in the discussion.
No email address required.
More options
Context
More options
Context
More options
Context
I paid for the whole processor, I'm gonna use the whole processor.
yeah I think I'll have to think this one more thoroughly, not even![:marseycry: :marseycry:](https://i.rdrama.net/e/marseycry.webp)
-O3 -march=native
can save meme rn:
Jump in the discussion.
No email address required.
More options
Context
holy shit bros, I was trying to optimize the absolute shitfrick out of my function, still had it crawl past at a snail's pace until I added memoization, and the lines rolled past so fast that I genuinely thought I had a bug. I literally creamed my pants. Yeah, I nutted from code. I'm codesexual.
Jump in the discussion.
No email address required.
I just did it and got the wrong answer for another hour of debugging because I overflowed an integer lmao but finally working
Jump in the discussion.
No email address required.
More options
Context
More options
Context
This started as a recursive solution but I ended up unwinding it. I don't know how people can solve this shit within minutes
Jump in the discussion.
No email address required.
More options
Context
Part 1 is just a simply brute force with recursion. For part 2 my first attempt was to just store the results in some cache and it immediately worked.
So just a generic use brute force then do dp problem
Jump in the discussion.
No email address required.
More options
Context
am I being dumb and missing an easier "correct" way to do it, or am I right to keep riffling through this constraint solver library's documentation?
Jump in the discussion.
No email address required.
More options
Context
I did part one with regex, looked at part 2 and went to bed.
Jump in the discussion.
No email address required.
More options
Context
Recursion is a harsh mistress
Jump in the discussion.
No email address required.
More options
Context
Runtime: 7.35 seconds
Jump in the discussion.
No email address required.
More options
Context
Bit of a late entry. I would have saved a lot of time if I remembered memoization sooner![:marseycry: :marseycry:](https://i.rdrama.net/e/marseycry.webp)
Jump in the discussion.
No email address required.
More options
Context
tfw the memoization technique was easy enough to infer but I got stuck for hours because I forgot to change an int to a long![:marseydoomer: :marseydoomer:](https://i.rdrama.net/e/marseydoomer.webp)
Jump in the discussion.
No email address required.
I did the exact same thing this morning dw
Jump in the discussion.
No email address required.
More options
Context
More options
Context
this sounds like it's a math formula problem inputting available #x remaining and #n1#n2.. not so much a spacial one the problem suggests
too dumb for this, SKIP
Jump in the discussion.
No email address required.
use memoziation friend
literally
@funccowtools.cache
and ur done
Jump in the discussion.
No email address required.
More options
Context
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