about summary refs log tree commit diff
path: root/day07.k
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2017-12-08 13:58:59 +0100
committerLeah Neukirchen <leah@vuxu.org>2017-12-08 13:58:59 +0100
commit1d15071800b621c219e71858978d4f320cc1b89f (patch)
tree50ea57f5b7cfd5806ed128a9a6c12d3e15cd2207 /day07.k
parent2e09dc131e1c8fad8aac0e51fe4162ecdcf5194e (diff)
downloadadventofcode2017-1d15071800b621c219e71858978d4f320cc1b89f.tar.gz
adventofcode2017-1d15071800b621c219e71858978d4f320cc1b89f.tar.xz
adventofcode2017-1d15071800b621c219e71858978d4f320cc1b89f.zip
day07
Diffstat (limited to 'day07.k')
-rw-r--r--day07.k10
1 files changed, 10 insertions, 0 deletions
diff --git a/day07.k b/day07.k
new file mode 100644
index 0000000..6efc7bf
--- /dev/null
+++ b/day07.k
@@ -0,0 +1,10 @@
+d:0:`day07
+r:({x@&&\~x=" "}'d)!{","\((">"\x)[1]^" ")}'d  / right hand sides
+w:(!r)!{"i"$x@&(x>47)&x<58}'d                 / weights
+
+*(!r)^,/. r                                   / fbgguv
+
+W:{+/w[x],,/o'r@x}                            / recursive weight
+w[j]-f-*c^f:W@j:r[i;**{1=#x}#.=c:W'r@i:b@*<W'b:&{$[#x;~1=#?W'x;0]}'r]   / 1864
+
+\\