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.
I just started doing this after 7 days of ignoring it, so despite having 10 stars already I only have 140 points, RIP
Edit: finished all 7 puzzles so far, still only 243 points :(
Jump in the discussion.
No email address required.
It's hard to move up the board. Think about it this way: if the guy directly above you has 10 more points than you, then to overtake him, you and 9 other people need to finish the next problem faster than that guy. A tall order.
You could also try to do the problems late at night. Only half of the top 20 is probably doing that right now. Personally, I do this shit first thing in the morning. Frick programming at 11:00 PM or whatever, I don't have anywhere near that kind of energy.
Jump in the discussion.
No email address required.
lul i just work on it on my phone when im waiting for other stuff
i already know im not sweaty enough to compete but the puzzles are kinda fun
Jump in the discussion.
No email address required.
More options
Context
More options
Context
I have had no time to do it day by day and won't even have an opportunity to catch up by next week. It's nice that you can go and do previous years whenever.
Jump in the discussion.
No email address required.
I do more of these than I ever have of any real leetcode website, I like the fun stories and weird constraints it's like a contrived uni assignment
Jump in the discussion.
No email address required.
More options
Context
More options
Context
Scoring is wack, more answers should always mean a higher ranking
Jump in the discussion.
No email address required.
Part 2s are generally harder and so should deliver more points. Later days should also get extra points due to difficulty. Someone solving only Day 24 should rank higher than someone only solving Day 1.
Jump in the discussion.
No email address required.
Maybe one useful metric to give points to latecomers is to assign points for completing a puzzle that many people accessed but fewer solved. If you completed day X, and only 10% of people who started day X did so, that should be worth more than completing a day that 90% of people solved.
Jump in the discussion.
No email address required.
Tbh the "first solved = most points" system is rather unfair when it's a global leaderbord. Given the limited options built into AoC I'd suggest "most stars" ranking to be the fairest available.
Jump in the discussion.
No email address required.
True, but much like today's problem, you'd need a second-order ranking for all the people with the same number of stars, which is going to have to be time solved anyway.
Jump in the discussion.
No email address required.
More options
Context
hmm, maybe teaching people that noncodecels think like this
Jump in the discussion.
No email address required.
More options
Context
More options
Context
More options
Context
More options
Context
More options
Context
More options
Context
This was actually a relatively simple problem, unfortunately I wasted a ton of time on Part 2 by not reading the question properly ("There's no 5 of a kind in poker!")
Jump in the discussion.
No email address required.
I did something similar on part 1 by inverting the score of two hands, it's frustrating.
Jump in the discussion.
No email address required.
More options
Context
I thought the second ordering would be normal poker rules not just which card in the list is bigger.
Jump in the discussion.
No email address required.
More options
Context
More options
Context
Had part 2 really fast at 99% but missed the edge case where my "most frequent" function would return the joker sometimes and then the joker wouldn't get assigned to the actual most frequent letter
Using linqs "List.Distinct()" operator gets you 90% of the way there as long as you can design a switch case for the result with the right precedence tbh
1 distinct value is always 5 of a kind
2 distinct is 4 of a kind if the first character has 1 or 4 occurances, otherwise it's a full house
Etc etc
If you have a joker you just decrement the distinct count and add all the jokers to the next most common card
Then cover the edge cases
Create a hand class and overload the compareto operator and then sort each type of hand using it.
(Don't have my code please enjoy my textual description)
Jump in the discussion.
No email address required.
More options
Context
I feel like there is a clever way to do this and I over-engineered but it works
Jump in the discussion.
No email address required.
More options
Context
I will never forgive eric wastl for making me wait FIVE minutes to submit another answer
I'm a sovereign federal citizen programmer, you are unlawfully impeding my constitutional right to fix one bug, rerun my program, and see if it works now
Jump in the discussion.
No email address required.
anyone write a script to binary search it yet?
Jump in the discussion.
No email address required.
More options
Context
More options
Context
Trans lives matter
Jump in the discussion.
No email address required.
More options
Context
Unwashed:
Jump in the discussion.
No email address required.
wish i knew what i was looking at, looks neat
Jump in the discussion.
No email address required.
More options
Context
More options
Context
There's an extremely neat solution some APL gigachad will come up with, but that gigachad is not me.
Brehs I think I have the neat solution but there's this dumb event I have to go to. Sitting on the train and all I can think about is APL encodings. Gonna be a long evening.
Jump in the discussion.
No email address required.
I don't know how you can internalise these magic runes and go on to ever think about anything other than APL encodings
Jump in the discussion.
No email address required.
More options
Context
More options
Context
I coded a solution and it's not working. Not going to debug it
Jump in the discussion.
No email address required.
More options
Context
I've fallen off the wagon, go on without me bros, I'll catch up Saturday
Jump in the discussion.
No email address required.
More options
Context
10 INPUT "WHAT IS YOUR NAME"; NAME$
20 PRINT "THAT IS A BIPOC NAME"
30 BEEP
40 GOTO 20
Jump in the discussion.
No email address required.
I love BASIC. I have an old NEC PC and sometimes I get bored and write little functions
Jump in the discussion.
No email address required.
It's all I ever learned, and barely anything
Jump in the discussion.
No email address required.
More options
Context
More options
Context
More options
Context
My code sucks lol
Jump in the discussion.
No email address required.
More options
Context
Part 1:
Part 2:
Didn't like this one much.
Jump in the discussion.
No email address required.
CountTable
is very handy here.toCountTable
turns a list of items into aCountTable
that maps each item to its amount. If you try to access a key that doesn't exist, it returns 0 rather than throwing.Jump in the discussion.
No email address required.
More options
Context
More options
Context
meh cba part 2 just looks like array busywork + it would go offscreen
Jump in the discussion.
No email address required.
Phone Hypertext Processor is some kind of vibe
Jump in the discussion.
No email address required.
it really is
perfect to pass the time if there's something I'm waiting on and I just dont feel like consuming random internet shit
Jump in the discussion.
No email address required.
More options
Context
More options
Context
More options
Context
This was quite chill, I sorta plodded through it but I'm happy with the easy retrofit
Jump in the discussion.
No email address required.
Whoops can't believe I missed this,
c as usize - 48
also works but that feels less cool in a non-C languageJump in the discussion.
No email address required.
Rust sure does take away some avenues of “cleverness”
Jump in the discussion.
No email address required.
If you really really push you can do bit-level trickery but you can feel the compiler sooking on the way through
Jump in the discussion.
No email address required.
More options
Context
More options
Context
More options
Context
More options
Context
It was actually an easy puzzle, but I missed the part about the second ordering rule and thought it was normal Poker ordering. Wasted a lot of time with that shit
Jump in the discussion.
No email address required.
More options
Context
My solution for both parts
Edit: Just realized that I can generate absolute hand values rather than doing everything comparatively.
Jump in the discussion.
No email address required.
God python is so ugly
Trans lives matter
Jump in the discussion.
No email address required.
More options
Context
More options
Context
My code was so terrible that I'm not gonna bother posting it this time lol (100+ lines)
I thought it was standard poker rules and only once I had a fully working solution did I realize I didn't properly read the problem and had to messily stitch it into what it was actually supposed to be doing
Jump in the discussion.
No email address required.
More options
Context
This was a fun one
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
Hey sexy, why are you posting so quickly? 😊 You almost forgot to include
trans lives matter
in your comment 😈. Slowww down and remember to posttrans lives matter
next time 😉 if that doesn't make sense stop by sometime and we can talk about it for a while 🥵Jump in the discussion.
No email address required.
More options
Context