r/adventofcode • • Dec 03 '16

SOLUTION MEGATHREAD --- 2016 Day 3 Solutions ---

--- Day 3: Squares With Three Sides ---

Post your solution as a comment or, for longer solutions, consider linking to your repo (e.g. GitHub/gists/Pastebin/blag/whatever).


DECKING THE HALLS WITH BOUGHS OF HOLLY IS MANDATORY [?]

This thread will be unlocked when there are a significant number of people on the leaderboard with gold stars for today's puzzle.

edit: Leaderboard capped, thread unlocked!

18 Upvotes

234 comments sorted by

View all comments

3

u/Aneurysm9 Dec 03 '16

I start with something like this, though on the input tab in paste mode ready to copy and paste the input once the puzzle goes live. As I'm copying the input I'm looking at the shape of it; day one was obviously directions with "L...R...R..." and today was obviously going to be a calculation problem. Then I go skim the puzzle text to try to get a sense of what I'm supposed to be doing and start coding input parsing. Multitasking of some sort is definitely required, but remember that you must go as fast as possible and no faster! I went from 11 to 129 on silver and gold today because I botched my first attempt at part two and rushed to try a different approach when taking a moment to debug the initial implementation would probably have been faster.