A series of challenges in the spirit of the holidays ๐
All of these solutions will be written and verified with Python with the following goals in mind:
- Efficiency, where an efficient algorithm will do the job without over-killing the problem. I am aiming for a cumulative sub-15 seconds using plain Python (no PyPy or JIT compilers) for these tasks.
- Organization. Avoid duplicate code for better readability and modularity. No ๐ code!
- Keep it simple!
- Day 1: Site went down, and apparently I did not refresh it fast enough.
- Day 3: Kept the extra newlines in the data, immediately regretted my decision.
- Day 9: Two lessons learned: always preprocess input, and always go for the simpler solution (unless it's too slow but I should've checked).
- Day 10: Should've read the end of the problem first, because I solved the wrong problem for part 1.
- Day 12: Getting good sleep is important!
- Day 14: Reading is hard ;-;
- Day 18: Took a "nap" and woke up way after the contest began...
- Day 21: I don't understand how I misunderstood the problem this badly.
- Day 22: Lost all my time from a misleading example and a hidden key point. The bad streak continues...
- Day 23: The bad streak continues... The good news is that I completed all of my schoolwork so I can focus on AOC now :)
- Day 24: The bad streak continues...
Day | Name | Part 1 | Part 2 | Points | Runtime |
---|---|---|---|---|---|
1 | Report Repair | 622nd | 545th | 0 | 1ms |
2 | Password Philosophy | 24th | 34th | 77 + 67 = 144 | 2ms |
3 | Toboggan Trajectory | 306th | 174th | 0 | 1ms |
4 | Passport Processing | 139th | 51st | 0 + 50 = 50 | 4ms |
5 | Binary Boarding | 39th | 22nd | 62 + 79 = 141 | 2ms |
6 | Custom Customs | 113th | 23rd | 0 + 78 = 78 | 2ms |
7 | Handy Haversacks | 14th | 24th | 87 + 77 = 164 | 4ms |
8 | Handheld Halting | 52nd | 23rd | 49 + 78 = 127 | 10ms |
9 | Encoding Error | 261st | 817th | 0 | 5ms |
10 | Adapter Array | 255th | 50th | 0 + 51 = 51 | 1ms |
11 | Seating System | 20th | 21st | 81 + 80 = 161 | 349ms |
12 | Rain Risk | 455th | 228th | 0 | 1ms |
13 | Shuttle Search | 29th | 53rd | 72 + 48 = 120 | 1ms |
14 | Docking Data | 155th | 456th | 0 | 32ms |
15 | Rambunctious Recitation | 251st | 73rd | 0 + 28 = 28 | 5373ms |
16 | Ticket Translation | 90th | 72nd | 11 + 29 = 40 | 26ms |
17 | Conway Cube | 14th | 18th | 87 + 83 = 170 | 302ms |
18 | Operation Order | 3016th | 1753rd | 0 | 36ms |
19 | Monster Messages | 404th | 132nd | 0 | 133ms |
20 | Jurassic Jigsaw | 236th | 158th | 0 | 228ms |
21 | Allergen Assessment | 1026th | 647th | 0 | 3ms |
22 | Crab Combat | 117th | 263rd | 0 | 1370ms |
23 | Crab Cups | 614th | 139th | 0 | 5985ms |
24 | Lobby Layout | 368th | 173rd | 0 | 208ms |
25 | Combo Breaker | 392nd | 321st | :( | 919ms |
Current score: 1274 points
Total runtime: 14998 milliseconds (under the 15 second limit by 2ms!)
Credits to Eric Wastl (the creator of AOC) for the amazing ASCII calendar art!
- Keeping some templates would be nice (double newline input parsing, bipartite matching, linked list)
- I should brush up on regexes
- I should practice number theory and linked lists problems
- Be less afraid of attempting backtracking
- Set an alarm for 30 minutes before every night
- Reading skills are important ;-;
- Debugging skills are important ;-;
With that being said, I am more than happy about my performance this year. This is not only the first year I've made it to the top 100, but the first year I completed all 25 days as well. Looking forward to Advent of Code 2021!