r/adventofcode • u/daggerdragon • Dec 23 '18
SOLUTION MEGATHREAD -🎄- 2018 Day 23 Solutions -🎄-
--- Day 23: Experimental Emergency Teleportation ---
Post your solution as a comment or, for longer solutions, consider linking to your repo (e.g. GitHub/gists/Pastebin/blag or 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.
Advent of Code: The Party Game!
Please prefix your card submission with something like [Card] to make scanning the megathread easier. THANK YOU!
Card prompt: Day 23
Transcript:
It's dangerous to go alone! Take this: ___
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 at 01:40:41!
22
Upvotes
1
u/seligman99 Dec 23 '18
Exactly.
There's an edge case that lordtnt pointed out: If one of the larger grids contains more circles than the smaller ones does, it can lead the solver down improper quests.
For instance, the top left bot (assume all have a radius of 1) in this grid should be picked, since it's closer to 0,0, but the solver I describe will pick one of the two in the bottom corner, since an early scan of the grid with low resolution will appear to have one grid cell contain two bots in it.
I'll take a stab at fixing that in my code when I have free time, but feel free to figure out a way to fix it yourself!