The problem states that contestants start each 30 seconds. Let's say that running times are:
- Runner1 30:00.0 (starting at 0:00.0, finishing at 30:00.0)
- Runner2 29:31.0 (starting at 0:30.0, finishing at 30:01.0)
This means that
- Runner1 has the best time after 30 minutes from the start of the race
- Runner2 has the best time, 1 second after Runner1
So they are both in the top.
However, if:
- Runner1 30:00.0 (starting at 0:00.0, finishing at 30:00.0)
- Runner2 29:29.0 (starting at 0:30.0, finishing at 29:59.0)
Then Runner2 finishes BEFORE Runner1, so Runner1 will never have a best time.
An explanation for the problem sample is a bit below (
http://acm.timus.ru/forum/thread.aspx?id=26847&upd=634557023855807397). For me, it was easier to explain on this other example.
Hope this is clear, good luck!
P.S.: I see you already have AC, congratulations!
Edited by author 16.12.2011 19:35