r/adventofcode • u/daggerdragon • Dec 23 '16
SOLUTION MEGATHREAD --- 2016 Day 23 Solutions ---
--- Day 23: Safe-Cracking ---
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".
JINGLING ALL THE WAY 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!
3
Upvotes
View all comments
Show parent comment
1
u/[deleted] Dec 23 '16
Heh, I did nearly the same thing.
Solved part 1 by extending and reworking my Clojure interpreter.
Saw part 2, went "shit I don't want to make an optimizer", took the assembly, understood it, recoded it in C, and ran it. Complete with horrible special case/shortcurts for tgl because of how the logic is structured. Probably would've taken me less time to keep going on the Clojure but it felt clever to do this :P
Simply compile and run, passing the initial value of a as first argument.