about summary refs log tree commit diff
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2016-12-05 14:39:53 +0100
committerChristian Neukirchen <chneukirchen@gmail.com>2016-12-05 14:39:53 +0100
commitfa50c09740fd8a0b160a53c307a98e2234057726 (patch)
tree19ab31600d7e0ae7ecc148f3e0864680c28fddf0
parent4865bd6050f132e3950285112098c9bb9b53e43f (diff)
downloadadventofcode2016-fa50c09740fd8a0b160a53c307a98e2234057726.tar.gz
adventofcode2016-fa50c09740fd8a0b160a53c307a98e2234057726.tar.xz
adventofcode2016-fa50c09740fd8a0b160a53c307a98e2234057726.zip
day04: tweaks
-rw-r--r--day04.k3
1 files changed, 3 insertions, 0 deletions
diff --git a/day04.k b/day04.k
index 9c16683..f2ef8f6 100644
--- a/day04.k
+++ b/day04.k
@@ -3,5 +3,8 @@ n:{.:x@&~(x<"0")|x>"9"}
 +/n'm:{(1_-6#-1_x)~5#!=v@>{(+/x=*x),-*x}'v,\:v:-7_x^"-01234567890"}#0:"day04"
 / 361724
 
+/ thanks to John Earnest
++/n'm:{(1_-6#-1_x)~5#>#:'=v@<v:-7_x^"-01234567890"}#0:"day04"
+
 n@*{"north"~5#`c$"a"+26!(n@x)+x-"a"}#m
 / 482