sort by first occurrence by *yuko*

var s,t:string(999)=^j;begin repeat readln(t);t:=t+^j;insert(t,s,pos(t,s)+ord(pos(t,s)=0)*length(s))until eof;write(s)end.

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

download

return to the top page