about summary refs log tree commit diff
path: root/day22.k
blob: a67c48d96af8839a3b6f3a98684f16e5b57e2729 (plain) (blame)
1
2
3
4
5
6
7
d:{.:@[x;&(x<"0")|x>"9";:;" "]}'2_0:"day22"
+/{(~x[3]>x[10])&(~x[0 1]~x[6 7])&0<x[3]}',/d,/:\:d	/ 985

ms:&/d[;2]
mx:|/{(*x)*0=x[1]}'d
`0:"\n"/+(32 32#" "){.[x;2#y;$[(2#y)~mx,0;"G";y[3]>ms;"#";~y[3];"_";"."]]}/d;
/ 179 manually