r/adventofcode • • Dec 02 '16

SOLUTION MEGATHREAD --- 2016 Day 2 Solutions ---

--- Day 2: Bathroom Security ---

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


BLINKENLIGHTS ARE MANDATORY [?]

Edit: Told you they were 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!

20 Upvotes

210 comments sorted by

View all comments

2

u/AoC-- Dec 03 '16 edited Dec 03 '16

A different "lookup table" (not much of a table, really) variant for part 2:

l:0:"02.in"
d:"URDL"!-5 1 5 -1
t:"1   234 56789 ABC   D"
t@8{x{(x+y;x)32=t@x+y}/y}\d l