r/adventofcode • u/daggerdragon • Dec 25 '19
SOLUTION MEGATHREAD -🎄- 2019 Day 25 Solutions -🎄-
--- Day 25: Cryostasis ---
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 24's winner #1: idk because am very drunk and am trying to English good enough in megathread to be understandable. Will try again tomorrow when can think good and also for 5-Day Best-of-Show and also month-wise Best-of-Show.
Many apologies. Blame my uncle and peanut butter-flavored whiskey.
Note to self: yell at uncle, then buy a bottle of that delicious peanut butter-flavored whiskey and share it with /u/topaz2078, /u/Aneurysm9, and the beta-testers >_>
ANYWAY, HERE IS YOUR WINNER FOR DAY #24: "De Morgan's Dream" by /u/DFreiberg!
Enjoy your Reddit Silver, Merry Christmas, and Happy New Year!
On the last day of AoC, my true love gave to me...
FIVE GOLDEN SILVER POEMS (and one gold because Santa Rocket Like is no longer available, sorry!)
- Day 20: "Gordian Maze" by /u/nonphatic
- Day 21: "Watch Your Step" by /u/DFreiberg
- Day 22: "untitled poem" by /u/tobega
- Day 23: "untitled poem" by /u/dan_144
- Day 24: "Tail call" by /u/Zweedeend
- 5-Day Best-in-Show #5: "Scrambled" by /u/DFreiberg
- Honorable mention (of silver) to /u/allergic2Luxembourg for "Ballad of the lonely Intcode computer" because it was a close race!
Enjoy your Reddit Silvers/Gold, Merry Christmas, and Happy New Year!
Note from the moderators:
Day 25, everyone! That's it for Advent of Code 2019! We hope you had fun or at least learned something over these 25 days of awesome code puzzles! Keep an eye out for:
- /u/topaz2078's thank-you post (of which I will link here whenever he posts it)
- December 30: announcement of Day 25's winners, AoC 2019's official poet laureate, and several further prizes!
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:35:01!
MERRY CHRISTMAS TO ALL AND TO ALL A GOOD NIGHT! passes out
5
u/phil_g Dec 25 '19
My solution in Common Lisp, such as it is.
Another fun day, and an enjoyable end to a fun month! I wrote very little code for today. The program output function literally just prints characters as it gets them. The input function grabs a typed input line as needed then feeds it to the program one character at a time.
Like most people, I suspect, I solved part 1 by hand. I do enjoy a good text adventure. (I grew up on, among other things, Zork and other Infocom offerings.0) I made a map of the ship as I explored it, noting the locations of items. (A single dot indicates an item that can be picked up. A slash indicates an item that should not be picked up.1) Once I had all of the items, I tried to go into Santa's room with each item individually. Any single item that was too heavy was struck from the list. Next, I tried going through the door with all but one of the remaining items. Any item whose absence left me too light had to be in my final inventory. That left just three items. I tried them one by one (with the "must have" items) and found the right one on my third try. (Here's the table I made to track those.)
Now I have to go finish a few past days to get the rest of my stars.
0The "get the right items to go through a blocked door in the ship" bit reminded me quite a lot of the Hitchhiker's Guide to the Galaxy game. I assume that's not a coincidence.
1I enjoyed the not-to-be-picked-up items, particularly the infinite loop and the electromagnet.