aboutsummaryrefslogtreecommitdiff
path: root/day14.k
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2015-12-14 13:55:28 +0100
committerChristian Neukirchen <chneukirchen@gmail.com>2015-12-14 13:55:28 +0100
commite8ee73c2b058529ee427f89e388dc012bc354fbb (patch)
treee965604254f8053a376d02ab781e26ce28e413d3 /day14.k
parent6e1a90e46bf2ad22b0c10f27541b0f7413cc2a7a (diff)
downloadadventofcode2015-e8ee73c2b058529ee427f89e388dc012bc354fbb.tar.gz
adventofcode2015-e8ee73c2b058529ee427f89e388dc012bc354fbb.tar.xz
adventofcode2015-e8ee73c2b058529ee427f89e388dc012bc354fbb.zip
day14
Diffstat (limited to 'day14.k')
-rw-r--r--day14.k10
1 files changed, 10 insertions, 0 deletions
diff --git a/day14.k b/day14.k
new file mode 100644
index 0000000..995bcfb
--- /dev/null
+++ b/day14.k
@@ -0,0 +1,10 @@
+d:0:"day14";
+t:2503;
+
+ss:{1 _' (&y=y,x) _ y,x}; / split x at y
+l:ss[;" "]' d;
+
+r:+{t#((0$x@6)#0$x@3),(0$x@13)#0}'l; / incremental distance at second
+
+|/+/r
+|/+/{x=|/x}'+\r