Project website: Advent of Code 2016.
I use Perl for all the solutions.
Most assume the input data is in a file called
input.txt in the same
directory as the file. Some require extra modules from CPAN.
A note on scoring
I score my problems to mark where I’ve finished a solution myself or given up and looked for hints. A score of 2 means I solved both the daily problems myself, a score of 1 means I looked up a hint for one of the problems, and a zero score means I didn’t solve any of the problems myself.
The times are hours and minutes from the time of the puzzle release (00:00 EST) until I posted an announcement on Twitter.
My goals for this year (in descending order of priority):
- solve all problems myself (higher cumulative score than last year’s 43/50).
- solve all problems within 24 hours of release
- be among the first 1,000 on each day’s leaderboard
Day 1 — No Time for a Taxicab
I managed to get the correct solution in part 1 despite not taking absolute values in consideration, fixed in code.
Part 2 was frustrating as I didn’t have time to re-think the problem, instead I kludged something on top of part 1.
Score: 2, 9h50m.
Day 2 — Bathroom Security
Actually reading the Wikipedia article linked from day 1 helped me with part 2.
Score: 2, 4h21m.
Day 3 — Squares With Three Sides
The hardest part of this problem was cleaning up the input…
Score: 2, 3h59m.
Day 4 — Security Through Obscurity
A fun problem!
Score: 2, 3h38m.
Day 5 — How About a Nice Game of Chess?
I already had the required modules installed since 2015 day 4 and initially thought this was going to be straight repeat. While part 1 was indeed simple enough, part 2 threw me for a little loop due to the requirements to keep track of previous entries.
Score: 2, 2h32m.
Day 6 — Signals and Noise
Decided to try to solve this over breakfast.
Score: 2, 0h40m.
This was the last of the warmup problems. Things will get tougher from now on.
Day 7 — Internet Protocol Version 7
Not very proud of part 2, but at least I know what it does. Using regexps would be the obvious choice but I frankly lack the regex-fu to handle it.
Update: some quick googling revealed the existence of lookahead to deal with overlapping matches, so I whipped together an alternative part 2. This runs appreciably faster (although still within a second).
Just made the first 1,000 submitters for part 2.
Score: 2, 4h36m.
Day 8 — Two-Factor Authentication
My solution for day 8, both parts.
Really didn’t want to do this, it reeked of fiddly bit-flipping, but after thinking a bit the solution presented itself.
Again just squeeked in under the 1,000 first submitters for both parts.
Score: 2, 4h27m.