about summary refs log tree commit diff
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2016-12-25 15:44:44 +0100
committerChristian Neukirchen <chneukirchen@gmail.com>2016-12-25 15:44:44 +0100
commit43bafa7072da57abab5b35b03f52b09affe7cccc (patch)
tree4f384b416cdaa7b273b701e06de56fc3fb225f73
parentc9ee6ec46d566125469f4a818e745a570c139803 (diff)
downloadadventofcode2016-master.tar.gz
adventofcode2016-master.tar.xz
adventofcode2016-master.zip
day25 HEAD master
-rw-r--r--day2530
-rw-r--r--day25.k7
2 files changed, 37 insertions, 0 deletions
diff --git a/day25 b/day25
new file mode 100644
index 0000000..49f6e79
--- /dev/null
+++ b/day25
@@ -0,0 +1,30 @@
+cpy a d
+cpy 7 c
+cpy 365 b
+inc d
+dec b
+jnz b -2
+dec c
+jnz c -5
+cpy d a
+jnz 0 0
+cpy a b
+cpy 0 a
+cpy 2 c
+jnz b 2
+jnz 1 6
+dec b
+dec c
+jnz c -4
+inc a
+jnz 1 -7
+cpy 2 b
+jnz c 2
+jnz 1 4
+dec b
+dec c
+jnz 1 -4
+jnz 0 0
+out b
+jnz a -19
+jnz 1 -21
diff --git a/day25.k b/day25.k
new file mode 100644
index 0000000..a569897
--- /dev/null
+++ b/day25.k
@@ -0,0 +1,7 @@
+p:" "\'0:"day25"
+v:{(r,"i"$,x)"abcd"?*x}
+e:{t:"abcd"?*|c:p[i]; i+:1; s:~[**c;]
+ $[s"o";`0:$v@c@1; s"c";r[t]:v@c@1; s"i";r[t]+:1; s"d";r[t]-:1; s"j";i+:(-1+v@*|c)*~0=v@c@1];r}
+
+a:(2/12#1 0)-7*365	/ 175
+r:a,0 0 0;i:0;*1000000 e/1