Count the Overlap by fizzie

: o { a b c d } a c max a b + c d + min over - 0 max ;
: s o 2>r o 2r> ;
: t s nip * nip ;
: g
stdin slurp-fid bounds do
i c@ bl = if
i 1+ 2 s>number? * + ?dup or
depth 12 = if
{ a b c d e f g h i j k l }
e g i k f h j l s b d 2rot a c t
e g i k f h j l t
a c i k b d j l t
a c e g b d f h t
." ab " . ." ac " . ." bc " . ." abc " 1 .r cr
then then loop ;
g

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page