aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2015-12-11 22:20:04 +0100
committerChristian Neukirchen <chneukirchen@gmail.com>2015-12-11 22:20:04 +0100
commit54b99d9049559d9c562ed27bdad0dc855141878d (patch)
treeddc336bd6a7e15fb2b6b2d2726fe942209cf0419
parent7dcc57442fcbaa83e40bf5f832799e235b6b2f57 (diff)
downloadadventofcode2015-54b99d9049559d9c562ed27bdad0dc855141878d.tar.gz
adventofcode2015-54b99d9049559d9c562ed27bdad0dc855141878d.tar.xz
adventofcode2015-54b99d9049559d9c562ed27bdad0dc855141878d.zip
day11
-rw-r--r--day11.k14
1 files changed, 14 insertions, 0 deletions
diff --git a/day11.k b/day11.k
new file mode 100644
index 0000000..bff5ad5
--- /dev/null
+++ b/day11.k
@@ -0,0 +1,14 @@
+d: "hepxcrrq";
+
+abc: _ci' (_ic "a") + !26;
+
+inc:{abc @ 26 _vs 1+26 _sv abc ?/: x}; / broken with leading "a"...
+
+infix:{:[y>#x;,x;x@(!y)+/:!(1-y)+#x]};
+
+r1:{|/ {(!3)~x-*x}' infix[abc ?/: x; 3]};
+r2:{~|/ (#x)> x ?/: "iol"};
+r3:{1<#?x@&=':x};
+
+p1: (inc)/[{~(r1 x)&(r2 x)&(r3 x)};d]
+p2: (inc)/[{~(r1 x)&(r2 x)&(r3 x)};inc p1]