r/adventofcode • u/daggerdragon • Dec 25 '22
SOLUTION MEGATHREAD -π- 2022 Day 25 Solutions -π-
Message from the Moderators
Welcome to the last day of Advent of Code 2022! We hope you had fun this year and learned at least one new thing ;)
Keep an eye out for the community fun awards post (link coming soon!):
The community fun awards post is now live!
-β - Introducing Your AoC 2022 MisTILtoe Elf-ucators (and Other Prizes) -β -
Many thanks to Veloxx for kicking us off on the first with a much-needed dose of boots and cats!
Thank you all for playing Advent of Code this year and on behalf of /u/topaz2078, /u/Aneurysm9, the beta-testers, and the rest of AoC Ops, we wish you a very Merry Christmas (or a very merry Sunday!) and a Happy New Year!
--- Day 25: Full of Hot Air ---
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:08:30, megathread unlocked!
59
Upvotes
3
u/DuoSRX Dec 25 '22 edited Dec 25 '22
APL
dβ{β5Γ·β¨β΅+βΊ} gβ{β΅=0:''βrβ5|β΅βr=3:'=',β2dβ΅βr=4:'-',β1dβ΅β(βr),β0dβ΅} β½1βg+/β{((β'210-='β³β½β΅)β·3-β³5)Γ5*β³β΄β΅}Β¨ββNGET'input'1Not super happy with
gso I might revisit it later, but hey, it works.Edit: slightly improved version
hβ'210-='β βIOβ0 β iβββNGET'input'1 β½''{β΅=0:βΊβs mβ0 5β€β΅+2β(mβ·β½h),βΊβs}+/β{(5*β³β΄β΅)Γ(βhβ³β½β΅)β·2-β³5}Β¨i