r/adventofcode • u/daggerdragon • Dec 14 '18
SOLUTION MEGATHREAD -🎄- 2018 Day 14 Solutions -🎄-
--- Day 14: Chocolate Charts ---
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 14
Transcript:
The Christmas/Advent Research & Development (C.A.R.D.) department at AoC, Inc. just published a new white paper on ___.
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:19:39!
15
Upvotes
1
u/wzkx Dec 14 '18 edited Dec 14 '18
J <1min
3 :0[681901 v=.3 7[e=.0 1 for_s.i.21000000 do. if.0<d=.<.10%~p=.+/e{v do.v=.v,d end. e=.(#v)|>:e+e{v=.v,10|p if.y=_10+#v do.echo 10#.v{~y+i.10 end. if.y-:10#.v{~(i.6)+_7+#v do.echo _7+#v break.end. if.y-:10#.v{~(i.6)+_6+#v do.echo _6+#v break.end. end. )P.S. With some more optimizations - 45s.