about summary refs log tree commit diff
path: root/day07.k
diff options
context:
space:
mode:
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
+
+\\