Last Kristmas
Advent of Code 2021 in K.
Subscribe to the Atom feed.
See solutions on the Fediverse and Twitch.
Spoilers
Here be spoilers
f: "4.txt" lines: 0:f split: {y@{1+y+!x-(1+y)}':-1,&x=y,x} n: (-1+#lines)%6 draw: 0$'split[",";*lines] parse: {0$'n@&(0<)'#:'n:split[" ";x]} boards: (parse')'{5#(x _ lines)}'2+6*!n subst: {(z,y)@(!#z)|'(#z)*x=z} check: -1 won: {{x|y}/((5#check)~)'x,+:x} play: {:[(z/i:won'm:(subst[*x;check;]')'y) (*x),m@&i;_f[1_ x;m@&~i;z]]} score: {(*x)*(+/0>a)++/a:,/x@1} solve: {score play[draw;boards;x]} one: solve {x|y} two: solve {x&y}
All videos
As a torrent or a magnet link.