You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

10 lines
289 B

#!../k
\l l.k
a:.'","\*0:"i/13"
n:1+|/2#'b:0N 3#*|(~E@)T/(0;a;0;!0;!0)
+//2=r:n#(&*/n){@[x;n/2#y;:;y 2]}/b
f:{[m;r;p]c:100!@/|2#m:{(3>#x 4)&^2 99?100!@/|2#x}T/m
$[2<#v:m 4;[m[4]:!0;$[0>*v;r:v 2;p[v 2]:*v]];]
$[E m;r;(T@[m;3;:;,sgn@-/p 4 3];r;p)]}.
(3=#:)f/((0;@[a;0;:;2];0;!0;!0);0;&6)