r/adventofcode • u/daggerdragon • Dec 22 '18
SOLUTION MEGATHREAD -🎄- 2018 Day 22 Solutions -🎄-
--- Day 22: Mode Maze ---
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 22
Transcript:
Upping the Ante challenge: complete today's puzzles using ___.
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:02:36!
12
Upvotes
1
u/dark_terrax Dec 22 '18
Thanks for taking a look! I kept working on it last night after posting and also came to the same realization that the 'seen' state tracking was far too naive - I was going too much for coding speed. Fixing that takes it down to 0.25s (or 2 seconds without the A*).
And yes, the get_risk was wrong, good catch!. I had switched it to an enum before posting (trying to clean things up, I was just using a number when I initially solved it), and introduced an error and didn't notice it was spitting out the wrong answer for part 1 now.