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

What is with the damn 10 test?
Posted by Gheorghe Stefan 24 Aug 2004 23:14
I got WA at test 10... I compared my source with an AC one and got same results on many tests...
Re: What is with the damn 10 test?
Posted by Gheorghe Stefan 24 Aug 2004 23:22
oh God
I've wrote if (H == 13) H = M = S = 0 and got AC !
Re: What is with the damn 10 test?
Posted by mkd 10 Apr 2005 18:23
In test 10 you may have a precision problem. When comparing double values use some epsilon like 1e-9. It worked for me at least...
Re: What is with the damn 10 test?
Posted by Denis Koshman 11 Aug 2008 08:56
I rewrote everything to long arithmetics and fair fractions, still WA10. The problem is that the answer is 00:00:00. I checked only control points (moments of power and weakness for all 4 forces), but if resulting function is minimal and constant on range [x2;24*60*60) U [0;x1), then the answer should be 0. Simply adding 0 to list of points to check gave me AC. I believe solution with 'double' type would also do it :)

Edited by author 11.08.2008 08:58
Re: What is with the damn 10 test?
Posted by Sandello 3 Feb 2010 01:26
Oh, thank you very much! I added zero to my check list and at last i have AC now too :) (I had WA #10 before it)