r/adventofcode • u/daggerdragon • Dec 22 '18
SOLUTION MEGATHREAD -🎄- 2018 Day 22 Solutions -🎄-
--- Day 22: Mode Maze ---
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 22
Transcript:
Upping the Ante challenge: complete today's puzzles using ___.
This thread will be unlocked when there are a significant number of people on the leaderboard with gold stars for today's puzzle.
View all comments
Show parent comment
1
u/abnew123 Dec 22 '18
well, each swap is 7 added right? since any combination of 2 types can be done without swapping, I believe the max swaps without going out of bounds is (N+M) /2. So, in total D<4.5 (N+M). Since each K takes 2K, 2K < 3.5(N+M), so K< 1.75(N+M)? I don't know if that's tighter or less tight than your bound. I just used 2 instead of 1.75 in my solution.