Ranking __REVENGE__ by ksk

open List
open String
let rec($)?(r=read_line())x?(i=rindex r ' '+1)?(s=(x,r),int_of_string(sub r i(length r-i)))l=try x+1$s::l with _->map(fun(i,(x,r))->Printf.printf"%d %s
"i r)(Sort.list(<)(map(fun(r,n)->List.length(filter(fun(_,m)->m>n)(s::l))+1,r)(s::l)));;0$[]

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

download

return to the top page