Bead Sort by hakusui

for(t=[j=0];s=readline();j++)for(i in s)c=s[i],u=t[i]||'',t[i++]=c>'{'?c+u:u+c
for(a=++i;++a<i*j+i;)putstr(a%i?t[a%i-1].charAt(a/i%j):'\n')

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

download

return to the top page