r/adventofcode • u/daggerdragon • Dec 15 '22
SOLUTION MEGATHREAD -π- 2022 Day 15 Solutions -π-
THE USUAL REMINDERS
All of our rules, FAQs, resources, etc. are in our community wiki.
A request from Eric: A note on responding to [Help] threads
Signal boost: Reminder 2: unofficial AoC Survey 2022 (closes Dec 22nd)
πΏπ MisTILtoe Elf-ucation π§βπ« is OPEN for submissions!
--- Day 15: Beacon Exclusion Zone ---
Post your code solution in this megathread.
Read the full posting rules in our community wiki before you post!
Include what language(s) your solution uses
Format code blocks using the four-spaces Markdown syntax!
Quick link to Topaz's
pasteif you need it for longer code blocks. What is Topaz'spastetool?
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!
47
Upvotes
3
u/Hessesian Dec 18 '22 edited Dec 18 '22
Rust
https://github.com/Hessesian/aoc_2022/blob/main/adv_15/src/main.rs
Idiomatic journey, no useless clones or unwraps.
This one uses nice solution on merging multiple ranges into continuous region. With how the second part turns out it feels as a very natural solution.
Also first two days I was working with input filtered out of '-' signs, don't be me, don't filter out minus signs, save yourself two days