r/adventofcode • • Dec 04 '16

SOLUTION MEGATHREAD --- 2016 Day 4 Solutions ---

--- Day 4: Security Through Obscurity ---

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


CONSTRUCTING ADDITIONAL PYLONS 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!

15 Upvotes

168 comments sorted by

View all comments

Show parent comment

1

u/willkill07 Dec 04 '16

I think you'll like my improvements ;) the rarely used compare member function for std::string, the hack of logically negating that result to turn a 0 to a 1, and only using one data structure now.

I find it to be a lot more interesting when I know how simple it can be in other languages and want to show that it's possible with C++ without using boost and adhering to (many) best practices.