Medal Rankings by tails

s/^/ /
:1
s/\( ...\(a*b*\)c*\)\( ...\2b\w*\)/\3\1/
s/\( ...\(a*\)b*c*\)\( ...\2a\w*\)/\3\1/
$!N
s/\(...\)\(.*\n\)\1/\1a\2/
s/\(\( ...\)a*\)\(.*\n\)\2/\1b\3/
s/\(\( ...\)\w*\)\(.*\)\n\2/\1c\3/
t1
s/ / !/g
:
s/\(.*\) \(\w*\)!\B/\2\n\1/
t
s/!\(.\)/\1!/g
t
s/\b\(\w..\)\(a*\)\(b*\)/\1#\2#\3#/g
s/#/ 0123456789/g
s/\w*\(\w\)\w\{9\}/\1/g

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

download

return to the top page