Bead Sort by hakusui

f={it*.grep{1}.transpose()};(f(f(t="$System.in".split())*.sum{it-'|'}*.padLeft(t.size()-1,'|'))*.sum()+t[0]).any 0.&println

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

download

return to the top page