Presort array by I., S.

import List
m@main=readLn>>=print.concat.sort.map(map fst).groupBy(\x y->snd x==snd y).f>>m
f x=x`zip`scanl1(/=)(zipWith(<)x(99:x))

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

download

return to the top page