BWT by Defenestrator

import List
main@f=do s@(h:t)<-getLine;let m=sort[v++s|v<-tails t]in putStrLn$show(elemIndices s m!!0)++' ':map(!!length t)m;f

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

download

return to the top page