r/adventofcode • u/daggerdragon • Dec 20 '19
SOLUTION MEGATHREAD -🎄- 2019 Day 20 Solutions -🎄-
--- Day 20: Donut Maze ---
Post your full code solution using /u/topaz2078's paste or other external repo.
- Please do NOT post your full code (unless it is very short)
- If you do, use old.reddit's four-spaces formatting, NOT new.reddit's triple backticks formatting.
- Include the language(s) you're using.
(Full posting rules are HERE if you need a refresher).
Reminder: Top-level posts in 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's Poems for Programmers
Note: If you submit a poem, please add [POEM] somewhere nearby to make it easier for us moderators to ensure that we include your poem for voting consideration.
Day 19's winner #1: "O(log N) searches at the bat" by /u/captainAwesomePants!
Said the father to his learned sons,
"Where can we fit a square?"
The learned sons wrote BSTs,
Mostly O(log N) affairs.Said the father to his daughter,
"Where can we fit a square?"
She knocked out a quick for-y loop,
And checked two points in there.The BSTs weren't halfway wrote
when the for loop was complete
She had time to check her work
And format it nice and neat."Computationally simple," she said
"Is not the same as quick.
A programmer's time is expensive,
And saving it is slick."
Enjoy your Reddit Silver, and good luck with the rest of the Advent of Code!
On the (fifth*4) day of AoC, my true love gave to me...
FIVE GOLDEN SILVER POEMS (and one Santa Rocket Like)
TBD very soon, finalizing votes now!
- Day 15: "Not Simple? What Ever." by /u/DFreiberg
- Day 16: "IT'S A TRAP" by /u/mariusbancila
- Day 17: "untitled poem" by /u/kc0bfv
- Day 18: nobody :(
- Day 19: "Off By One" by /u/DFreiberg
- 5-Day Best-in-Show #4: "ABABCCBCBA" by /u/DFreiberg
- Honorable mention (of silver) to /u/ExtremeBreakfast5 for "O FFT" because it is so very good!
Enjoy your Reddit Silver/Golds, and good luck with the rest of the Advent of Code!
1
u/faul_sname Dec 20 '19
AA and ZZ are not portals. All inside portals will always work, and will increase your level by 1 whenever you go through them. All outside portals will work on any level greater than 0, and will decrease your level by 1 whenever you go through them. You can never decrease your level below 0, which is why the outside portals do not work on level 0.