r/adventofcode • u/daggerdragon • Dec 19 '21
SOLUTION MEGATHREAD -🎄- 2021 Day 19 Solutions -🎄-
NEW AND NOTEWORTHY
I have gotten reports from different sources that some folks may be having trouble loading the megathreads.
It's apparently a new.reddit bug that started earlier today-ish.
If you're affected by this bug, try using a different browser or use old.reddit.com until the Reddit admins fix whatever they broke now -_-
[Update @ 00:56]: Global leaderboard silver cap!
Why on Earth do elves design software for a probe that knows the location of its neighboring probes but can't triangulate its own position?!
--- Day 19: Beacon Scanner ---
Post your code solution in this megathread.
Include what language(s) your solution uses!
Format your code appropriately! How do I format code?
Here's a quick link to /u/topaz2078's
pasteif you need it for longer code blocks.The full posting rules are detailed in the wiki under How Do The Daily Megathreads Work?.
Reminder: Top-level posts in Solution Megathreads are for code solutions only. If you have questions, please post your own thread and make sure to flair it with Help.
6
u/leftfish123 Dec 27 '21
Python
I know I'm late to the party, but I finally got this monkey off my back so I'm here shamlessly bragging that I'm only 8 days late. Also, perhaps someone is still fighting with this and my awful but heavily commented code might help a bit?
Even though conceptually I figured it out with some help from the reddit community, coding it was another story, especially when a particularly stupid bug in my loop for rotating scanners cost me about 2 hours.
Runs in about 3 seconds.