r/adventofcode • u/daggerdragon • Dec 22 '22
SOLUTION MEGATHREAD -π- 2022 Day 22 Solutions -π-
All of our rules, FAQs, resources, etc. are in our community wiki.
AoC Community Fun 2022:
πΏπ MisTILtoe Elf-ucation π§βπ«
23h59m remaining until submission deadline tonight at 23:59 EST!
Teach us, senpai!
UPDATES
[Update @ 00:19:04]: SILVER CAP, GOLD 0
Translator Elephant: "From what I understand, the monkeys have
most ofthe password to the force field!"You: "Great! Now we can
take every last breath of fresh air from Planet Druidiameet up with the rest of the elves in the grove! What's the combination?"Translator Elephant: "I believe they say it is
one two three four five."You: "
One two three four five?! That's amazing! I've got the same combination on my luggage!"Monkeys: *look guiltily at each other*
[Update @ 01:00:00]: SILVER CAP, GOLD 35
You: "What's the matter with this thing? What's all that churning and bubbling? You call that a
radar screenGrove Positioning System?"Translator Elephant: "No, sir. We call it..." *slaps machine* "... Mr.
CoffeeEggnog. Care for some?"You: "Yes. I always have eggnog when I watch GPS. You know that!"
Translator Elephant: "Of course I do, sir!"
You: "Everybody knows that!"
Monkeys: "Of course we do, sir!"
[Update @ 01:10:00]: SILVER CAP, GOLD 75
Santa: "God willing, we'll all meet again in
SpaceballsAdvent of Code 2023 : The Search for MoreMoneyStars."
--- Day 22: Monkey Map ---
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?
4
u/Colin-McMillen Dec 22 '22
C on the Apple //c
I only did part 1 tonight, somebody's literarlly doing Redditor wife at the office door.
Wondered what the catch was today. No huge structs to fit in memory ? No recursion ? No bigints ? No exponential complexity ? OK it's in part two and it's more of a brain shredder than a CPU shredder.
No particular difficulty because I knew how it would go with the off-by-ones, so I made myself a simple map and "unit tests" to verify all cases.
Disappointed I didn't manage to make a visualisation, it is extremely far too slow.
May try the cube tomorrow!