Providing N horses and M(M <= N) tracks but no timer, all you could get from one round is the order of M horses. The questions how many rounds at least, if you want to get the rank of all horses?

e.g.
`N=3, M=3, Round=1;
N=3, M=2, Round=3;
N=4, M=3, Round=3;`

what is Round, when N=1000, M=3?