sort by first occurrence by nn

for(a=[];l=readline();)a[l]=-~a[l]
for(x in a)for(;a[x]--;)print(x)

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

download

return to the top page