Introduction
This year I participated in Frans Faase's private leaderboard for solving the AoC in C! I also joined the /g/ leaderboard, and placed first in both!
Retrospective
Overall, it was a really fun time. The puzzles were, and no offense to Eric as I know this is something he puts a lot of effort into and makes available for free, and this next bit is not meant as an insult, mostly `import solution` type things across most days, even the hardest of them solved fairly easily by z3, so I believe the fun I had was mostly due to the self imposed restriction of solving them only in C.
The leaderboard competition was fun, for both leaderboards, although I didn't have any post-match discussions with anyone on the pure C board. The /g/ threads were pretty lively though.
Runtime Stats
Cold-start single-run time for each puzzle so far:
1e+04 ms +-------------------------------------------------------------------------------------------+
|+ + + + + + + + + + + +| Part 1 *******
|+ : : + : : : : : : : +| Part 2 ###+###
|+ : : # : : : : : : : +|
1e+03 ms |-+.....:........:......#:#......:........:.......:........:.......:.......:........:.....+-|
|+ : : #:# : : : : : : : +|
|+ : : # : # : : : : : : : +|
|+ : : # : # : : : : ##+# : : +|
100 ms |-+.....+........:....#..:..#....:........:.......:........:.####..:.####..:........:.....+-|
|+ #*# : # : # : : : +# : ##+# : +|
|+ #:# : # : # : : : ##:* : : ## : +|
|+ #*: #* : # : # : : : ## *: * : : ## : +|
10 ms |-+...#.:..#*....:...#...:...#...:........:.......:..##..*.:.*.....:.......:.....##.:.....+-|
|+ # : # * : # : # : : :## * : * : : #+ +|
|+ #* : # ** : # : # : : ##+ * : * : : : +|
|+ # : # *: # : # : : #### : * : * : : : +|
| # : # **#* : # : *+# : * : * : : *** |
1 ms |-#*....:.....#..:.#.******....#.:.....*##:*......:..*.....:.....*.:.......:.....**.:.**..+-|
|+# : # :# : ** #: *## : ** : * : *: : ** : ***+|
|# : #:# : ***#: *## : * : * : **** : ** : *|
|# : ## : *### : * :* : : ****** : +|
0.1 ms |-+.....:........+.......:.......+........:.....**:*.......:.......:.......:........:.....+-|
|+ : : : : : * : : : : +|
|+ : : : : : : : : : : +|
|+ + + + + + + + + + + +|
0.01 ms +-------------------------------------------------------------------------------------------+
1 2 3 4 5 6 7 8 9 10 11 12
Day
(Day 12 is missing a datapoint for part 2 since, as is tradition, the last star is a freebie provided you have all the others from that year)
Daily Log
I'll talk about how each day goes as we progress through this month, so this part will be updated (~)daily
-
Day 1:
The puzzles open 10:30 my time, so there's ample room in the schedule for me to get to them when they open, and that was the plan, but I had a presentation scheduled for my term project and another end of semester exam, so I couldn't start then. Finished both in python (my apologies to my leaderboard buddies) when I had some downtime between the two engagements, and ported the solution to C once I reached my room.
-
Day 2:
Had an endsem rager yesterday so couldn't get up right in time, but still got to it after like 5 mins of waking up (3 minutes of the puzzle being live). Got both parts in C directly this time, though a regex lib would have been nice to have, will maybe work on something and add to the utils. Used some C23 features for today's solution (not necessary, just wanted to try them out), so updated the template and orchestration script to account for that.
-
Day 3:
Yesterday after getting some free time I added timing functions to the template, so both part 1 and part 2 solutions are automatically timed now. It's a single run so there's a non trivial amount of variance, but it's still able to give me a decent idea of how the day went. Will have it formatted properly soon; thinking of updating past day's entries to include the timings for them. Puzzle itself was fine, I was trying to do something clever but it kept failing so I tried to bruteforce, part 1 went through and while submitting I realised my issue and fixed the thing for part 2, so while I didn't ge first place through and through I was the first on my leaderboard to get both stars.
-
Day 4:
Have to leave for home (from college, sem's over etc etc) today so had to get through the puzzle quickly. Did get both parts done first on my board, but trying to come up with something optimal for part 2 led to a slower runtime on the code, maybe I'll optimize it later.
-
Day 5:
First AoC solve at home. Again, first to get both stars on my board, which is honestly mostly due to typing out the solutions fast enough, but it's allowed me to build a lead that I can use as a moat when the difficulty curves up in later days. The leaderboard had some issues updating even after I'd made my submissions, so like got a little hairy at the end.
-
Day 6:
Third straight day of maintaining a death grip on first place. Part 1 of the puzzle was easy, as per, but part 2 has some weird parsing logic that I couldn't quite land and it started stressing me out (although the point isn't to like get it fast, but still) but when I finally did land it it was still an hour before first place, so all good. (the past few days make me sound too cocky but like this is just me building a lead on the simpler parts, so when I have to take a full day to solve the problems I'll have some moat to maintain my position ;-;)
-
Day 7:
The reckoning arrived faster than expected ahahaha. Had my ass handed to me on part 2, and the funniest part is that I lost my first place in three leaderboards because the doorbell rang and I had to check who it was. Not a lot to say I suppose, it was an embarrasing performance and it'll only get harder from now.
-
Day 8:
Since I'm working on this later I just want to say that today and later days might have more than the occasional /g/ reference because I kept wasting hours on there after finishing, getting some sick pleasure from it all. Today's puzzle also had a slight, how would you say, ambiguity in the phrasing, which got me stuck on part 1, but once that was out of the way part 2 was a simple modification so it went very well.
-
Day 9:
First day where I was genuinely proud of my solution, getting to do some quick and dirty ray tracing is always fun. Part 2 filtered a lot of people for a while.
-
Day 10:
Probably the year's hardest, and I feel the only puzzle meant to present a challenge without some cop-out. Filtered loads, and if I'm not wrong there's still more participants that got part 1 (binary gauss-jordan) than did part 2 (integer gauss jordan).
-
Day 11:
Bit of a mess, but wrangling it landed me my most optimized solution for this year, probably. First there was a hash table implementation which for some reason kept killing itself (and my orchestration script would not report the error properly) and when I had that in order I realised that I wasn't even using the hash table properly, which is why it kept running out of memory. Lost first place overall because the the final answer was, if I recall, in the hundreds of trillion, and I simply hadn't accounted for that.
-
Day 12:
Beautiful NP-complete problem, would've brought me to tears if not for the input pattern which made it trivial. Second funniest thing that Eric did this year, having the trick apply on the main input but not on the sample :)