diff options
author | Christian Neukirchen <chneukirchen@gmail.com> | 2015-12-14 13:55:28 +0100 |
---|---|---|
committer | Christian Neukirchen <chneukirchen@gmail.com> | 2015-12-14 13:55:28 +0100 |
commit | e8ee73c2b058529ee427f89e388dc012bc354fbb (patch) | |
tree | e965604254f8053a376d02ab781e26ce28e413d3 | |
parent | 6e1a90e46bf2ad22b0c10f27541b0f7413cc2a7a (diff) | |
download | adventofcode2015-e8ee73c2b058529ee427f89e388dc012bc354fbb.tar.gz adventofcode2015-e8ee73c2b058529ee427f89e388dc012bc354fbb.tar.xz adventofcode2015-e8ee73c2b058529ee427f89e388dc012bc354fbb.zip |
day14
-rw-r--r-- | day14 | 9 | ||||
-rw-r--r-- | day14.k | 10 |
2 files changed, 19 insertions, 0 deletions
diff --git a/day14 b/day14 new file mode 100644 index 0000000..1532578 --- /dev/null +++ b/day14 @@ -0,0 +1,9 @@ +Vixen can fly 8 km/s for 8 seconds, but then must rest for 53 seconds. +Blitzen can fly 13 km/s for 4 seconds, but then must rest for 49 seconds. +Rudolph can fly 20 km/s for 7 seconds, but then must rest for 132 seconds. +Cupid can fly 12 km/s for 4 seconds, but then must rest for 43 seconds. +Donner can fly 9 km/s for 5 seconds, but then must rest for 38 seconds. +Dasher can fly 10 km/s for 4 seconds, but then must rest for 37 seconds. +Comet can fly 3 km/s for 37 seconds, but then must rest for 76 seconds. +Prancer can fly 9 km/s for 12 seconds, but then must rest for 97 seconds. +Dancer can fly 37 km/s for 1 seconds, but then must rest for 36 seconds. 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 |