Count the Overlap by int-e

m@main=getLine>>=putStrLn.unwords.h.words>>m;a(a:b:c:d:_)=max(a+b)0*max(c+d)0;g(_:x:z)= -x:x+z!!3:g z;h l=do s<-words"ab ac bc abc";s:[show$a$foldr1(zipWith min)[g$map read$snd$span(<[c])l|c<-s]]

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

download

return to the top page