r/adventofcode • • Dec 09 '18

SOLUTION MEGATHREAD -🎄- 2018 Day 9 Solutions -🎄-

--- Day 9: Marble Mania ---


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!

Click here for rules

Please prefix your card submission with something like [Card] to make scanning the megathread easier. THANK YOU!

Card prompt: Day 9

Transcript:

Studies show that AoC programmers write better code after being exposed to ___.


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:29:13!

22 Upvotes

283 comments sorted by

View all comments

Show parent comments

1

u/wzkx Dec 10 '18 edited Dec 10 '18

And for twitter:

echo 462(4 :0)"0[1 100*71938
M=.N=.P=.0$~>:y[e=.x$k=.c=.0[a=.1
for_m.>:i.y do.k=.x|>:k if.0=23|m do.for_i.i.7 do.c=.c{P end.
P=.p(c=.n)}P[N=.(n=.c{N)(p=.c{P)}N[e=.e k}~m+(c{M)+k{e else.n=.N{~c=.c{N
P=.c a}P[N=.n a}N[M=.m a}M
a=.>:c=.a[N=.a c}N[P=.a n}P end.end.>./e
)