about summary refs log tree commit diff
path: root/day22.k
diff options
context:
space:
mode:
Diffstat (limited to 'day22.k')
-rw-r--r--day22.k7
1 files changed, 7 insertions, 0 deletions
diff --git a/day22.k b/day22.k
new file mode 100644
index 0000000..a67c48d
--- /dev/null
+++ b/day22.k
@@ -0,0 +1,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