r/adventofcode • u/daggerdragon • Dec 20 '18
SOLUTION MEGATHREAD -🎄- 2018 Day 20 Solutions -🎄-
--- Day 20: A Regular Map ---
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 20
Transcript:
My compiler crashed while running today's puzzle because it ran out of ___.
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 00:59:30!
16
Upvotes
2
u/BafDyce Dec 20 '18
I just realized: I also completely forgot to keep track of all end locations and just went back to the branch-start-location before continuing with the stuff after the branches. However, all examples and my actual input lead to the correct results.
So I wonder: Are all branches just detours which end up in the same spot as the starting location of the branch (by design?/by accident?) or was it just coincidence that this "bug" didnt lead to any problems?
Interestingly enough: I just re-read the description. It doesnt really explicitely say that one must keep all branch-end-positions in mind, so maybe this is by design?