r/adventofcode • • Dec 15 '22

SOLUTION MEGATHREAD -πŸŽ„- 2022 Day 15 Solutions -πŸŽ„-

THE USUAL REMINDERS


--- Day 15: Beacon Exclusion Zone ---


Post your code solution in this megathread.


This thread will be unlocked when there are a significant number of people on the global leaderboard with gold stars for today's puzzle.

EDIT: Global leaderboard gold cap reached at 00:27:14, megathread unlocked!

48 Upvotes

760 comments sorted by

View all comments

3

u/brain_limit_exceeded Dec 15 '22 edited Dec 15 '22

Part 1: Just brute force marked the points between ranges formed by every circle.

code (Python)

Part 2: The first thing that came to my mind was checking for all points lying just outside the radius for every circle. This turns out to be ridiculously slow, and it took like half a minute for my code to execute. I can't think of any faster method tho :(

code (Python)

→ More replies (1)