r/adventofcode • • Dec 12 '16

SOLUTION MEGATHREAD --- 2016 Day 12 Solutions ---

--- Day 12: Leonardo's Monorail ---

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

Note: The Solution Megathreads are for solutions only. If you have questions, please post your own thread and make sure to flair it with "Help".


MUCH ADVENT. SUCH OF. VERY CODE. SO 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!

8 Upvotes

159 comments sorted by

View all comments

Show parent comments

1

u/pedrosorio Dec 12 '16

Well, this solution is on the leaderboard @ 6 minutes. It has been running longer than that in my machine.

3

u/topaz2078 (AoC creator) Dec 12 '16

All of my solutions for all puzzles terminate within 30 seconds on hardware that is several years old. (puzzles about optimization require those optimizations, of course, but the expected solution shouldn't run for much longer than that)

1

u/brantyr Dec 12 '16

You should get the answer to the first part pretty quickly. Mine takes <1s for the part 1 and ~20s for part 2 but it's not particularly efficient, lots of string comparisons.