about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--day13.k9
1 files changed, 9 insertions, 0 deletions
diff --git a/day13.k b/day13.k
new file mode 100644
index 0000000..ce394ea
--- /dev/null
+++ b/day13.k
@@ -0,0 +1,9 @@
+d:1350
+
+f:{(x*x) + (3*x) + (2*x*y) + y + (y*y)}
+
+w:~2!(+/2\{+/(d;x*x;3*x;2*x*y;y;y*y)}.)''(!50),/:\:!50
+m:w*{1 1~x}''(!50),/:\:!50
+
+-1+|/|/{~x . 31 39}{w*(x+x>0)|(+-1_'0,'+x)|(+1_'(+x),'0)|(1_'x,'0)|(0,'-1_'x)}/m
++/+/0<50{w*(x+x>0)|(+-1_'0,'+x)|(+1_'(+x),'0)|(1_'x,'0)|(0,'-1_'x)}/m