ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1154. Mages Contest

Something may help you (+)
Posted by Yu Yuanming 6 Jun 2005 16:45
When search will work, why not use it for a try?
Search all the time from 00:00:00 to 23:59:59, you can easily got AC in 0.031sec...:)

Also, there exist a algorithm use only O(1):
  Because all change in liner,the max ans must be in one of the 8 time.
  But take care that the "eariest" time may not be any of them, it can be an earier such as 00:00:00...