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 1357. Teakettle 1.0 for Dummies

Minor hints and clarifications
Posted by Denis Koshman 17 Aug 2008 18:59
1. Precision of 1e-10 seconds is enough to compare boil-time with wake-time.

2. If some guy wakes up at the same time the water is ready (I mean exact equality up to precision), the water is disposed to cups first. So he will fill up an empty tank in this case.

3. Output times after rounding them UP. It is not quite clear from problem statement, but it's the closest guess if we assume that drinking can start only at integer number of seconds. At least this approach gives AC.

4. Output rounded times modulo 24:00:00 (i.e. if cup is ready the next day, subtract 24 from HH).