Ranking __REVENGE__ by zetamatta

import sys
L=[e.split()for e in sys.stdin]
L.sort(lambda x,y:int(y[-1])-int(x[-1]))
p=r=i=1
for e in L:r=[i,r][p==e[1]];print r," ".join(e);p=e[1];i+=1

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

download

return top