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.
It was easier than yesterday, managed to complete it with much fewer lines
Jump in the discussion.
No email address required.
More options
Context
!codecels
Jump in the discussion.
No email address required.
More options
Context
Tried to use the new std::views std library which is kinda useful, but gives absolutely unhelpful error messages:
Jump in the discussion.
No email address required.
K
Jump in the discussion.
No email address required.
More options
Context
Brought it on yourself tbh
Jump in the discussion.
No email address required.
More options
Context
More options
Context
I did part two with
List<Stack<string>>
lmao can't post code but it took like 3 minutes to run
Jump in the discussion.
No email address required.
I'm surprised he didn't structure it so that you couldn't brute force it. Congrats
Jump in the discussion.
No email address required.
I thought I did something wrong because my debug messages showed the stack 368000 layers deep at card #37 but it went pretty quick after that
Jump in the discussion.
No email address required.
i tried doing a stack and popping cards off the bottom but it got to something like 770,000 cards long after a while and i gave up. i think it might have worked if i fricked off for a few hours but my answer was over 8,000,000 so i didnt bother sticking around to find out if it would or if i would have gotten an indexing error
Jump in the discussion.
No email address required.
More options
Context
More options
Context
More options
Context
More options
Context
The instructions for 2 were very confusing but the actual puzzle was pretty simple
Jump in the discussion.
No email address required.
I was scared that part 2 was going to be some hideous mathematical trick but I trusted that Eric wouldn't do that in day 4 and it was OK.
Jump in the discussion.
No email address required.
I spent more time on part 2 thinking there must be some algorithm I was missing and then like 1 minute going "frick it" and writing a double for loop like apparently everyone else did.
Jump in the discussion.
No email address required.
Usually with these problems I focus on quick and dirty first (timed leaderboards lmao) then after I submit I spend some time thinking about the "right way" when the mind goblins aren't telling me to hurry
Jump in the discussion.
No email address required.
More options
Context
More options
Context
More options
Context
More options
Context
im literally screaming, Easiest one yet
Step 1:
Step 2:
Jump in the discussion.
No email address required.
Nim is so pretty
Jump in the discussion.
No email address required.
ok so ikr, its like python with a type system thats not been frankensteined where it doesnt belong
im literally screaming, One thing I dont like is that you gotta import so much stuff for basic builtins, like I had to import std/math like just to get the ^ operator
Jump in the discussion.
No email address required.
More options
Context
More options
Context
More options
Context
Another "the hardest part is parsing the input" question
Jump in the discussion.
No email address required.
More options
Context
A neat little dynamic programming method of solving it. Just start at the end and use your previous solutions to calculate the current one.
Jump in the discussion.
No email address required.
More options
Context
Alright.. so..... It's been executing for about 3-5 hours now
I'm unable to actually verify that the 2nd part is solved but I'm pretty sure it is
Can't tell if
or shell issue
either way I'm gonna switch to php I am not skilled enough to continue with shell lmao
Good ol' php to save the day
Jump in the discussion.
No email address required.
More options
Context
Sets make this pretty easy
Jump in the discussion.
No email address required.
More options
Context
I agree with everyone else that the hardest part was understanding what Part 2 wanted
I believe the reason to put up with all the type shit cluttering my code is because the filters/maps are lazy eval'd and ready to be parallelised as-is, but I'm wondering if I really care
Jump in the discussion.
No email address required.
More options
Context
yesterday's was really annoying and after four days of string parsing problems, it was pretty easy
edit: oh yeah I should have used hash for performance reasons but oh well.
Jump in the discussion.
No email address required.
More options
Context
Day 4 and I already crashed the compiler:
Passing anything but an
int
orstring
toarrayWith
causes an internal compiler error. This includes integer literals.Jump in the discussion.
No email address required.
More options
Context
I am clinically r-slurred and wasted like 15 minutes repeatedly coding the wrong implementation of what they wanted in the second part, checking the spec, and then modifying my code to a new, still incorrect, behavior
Jump in the discussion.
No email address required.
More options
Context
Hardest part was understanding wtf part 2 wanted me to do.
Jump in the discussion.
No email address required.
More options
Context
Like day 2 felt easier than day 1, today was easier than yesterday.
Jump in the discussion.
No email address required.
Weekend tasks are usually harder, he's kind like that
Jump in the discussion.
No email address required.
Yeah I think it's planned in a way to try and stop people from burning out before they actually hit their limit
Jump in the discussion.
No email address required.
More options
Context
More options
Context
More options
Context
FRICK c++ I'm done with it after today's expedition into "dude, why isn't my vector erasing"
Jump in the discussion.
No email address required.
More options
Context
idk if im burnt out from tutoring bootcampers worse than i am over zoom for 3 hours or if its because i havent had a drink in 3 days but i still have no fricking clue what part 2 is trying to ask me to do so i shamelessly stole that part
Jump in the discussion.
No email address required.
The wording is retarded, they should've given a walkthrough.
Cards (you start with 1 of each):
1 1 1 1 1 1
Scores (from part 1):
4 2 2 1 0 0
Position 1: 1 card at this position, each scores 4. So add 1 to each of the next 4 cards.
Position 2: 2 cards at this position, each scores 2. So add 2 to each of the next 2 cards.
Position 3: 4 cards at this position, each scores 2. So add 4 to each of the next 2 cards.
Position 4: 8 cards at this position, each scores 1. So add 8 to each of the next 1 card.
Position 5: 14 cards at this position, each scoring 0. So add 14 to each of the next 0 cards (nothing).
Position 6: 1 card at this position, each scoring 0. Add nothing.
Final cards:
1 2 4 8 14 1
Sum:
30
Jump in the discussion.
No email address required.
I don't know what you said, because I've seen another human naked.
Jump in the discussion.
No email address required.
More options
Context
More options
Context
it's saying duplicate the subsequent cards for as many "wins" as "current card" has
Card 1 has 4 wins, now Card 1 gets its original point, and cards ( 2 + 3 + 4 + 5 ) get a point because of Card 1's wins.
Onto Card 2, it gets the initial/original point, on top of the 1 point it had received from Card 1. So Card 2 has 2 points. Say it had just 1 win. With just 1 win on Card 2, it gives a point to only the next Card 3. But it does it again for each point it has, and gives Card 3 another point. Now Card 3 has 1 point from Card 1, 1 point from Card 2, and 1 point grom Card 2's repeat. So 3 points.
When Card 3's up, on top of the 3 points it has received, it also gets its initial/original point now that it's up.. so 4 points. But say it didn't have any wins, and basically passes 0 points down, four times. The game is still on because the next Card 4 had received a point from the first Card 1 and has 3 wins.
Card 4 has the 1 point from Card 1, and gets its initial/original point, so 2 points. It gives the next 3 cards a point, then since it's got one more copy it does it again so Card 5, 6, and 7 are given a total of 2 points each. Continues on until there's a dead end, then u sum all the points.
My answer was 11,787,590 lmao
Jump in the discussion.
No email address required.
Your pulitzer's in the mail
Jump in the discussion.
No email address required.
More options
Context
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
Jump in the discussion.
No email address required.
More options
Context
are we looking at the same problem? Its a set intersection problem, pythoncels solved this in 6 chars.
Jump in the discussion.
No email address required.
Oh wait I'm r-slurred, I thought this was yeaterdays
Jump in the discussion.
No email address required.
More options
Context
More options
Context
That's great and all, but I asked for my burger without cheese.
Jump in the discussion.
No email address required.
More options
Context