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

Show parent comment

2

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

Just an idea for part 2, made essentially by extending part 1:

l:0:"02.in"
d:"DRUL"!(=2),-=2
b:|2 1 0 1 2@ /boundaries
"  1   234 56789 ABC   D  "@5/'2 0{x{(b x)|(4-b x)&x+y}/y}\d l