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 1070. Local Time

Stupid problem... Clarification must be included in problem description!!!
Posted by Alone 18 Jul 2011 21:45
Why if there is no answer, we should print "5"? It must be included in problem description!!!
Re: Stupid problem... Clarification must be included in problem description!!!
Posted by S.77 7 Aug 2011 16:35
Not 5, but we should add 30 minutes to difference we seek for. For instance, we've found "2H=9", what is unbelievable, 'cause it contradict the statement. But I increment this to get the even number 10=2*5. Answer: 5 hours.
I still don't know why is it true.

Update. I've just found my mistake. The tests are OK (but method of "increment" also works).

Edited by author 07.08.2011 16:57
Re: Stupid problem... Clarification must be included in problem description!!!
Posted by Joseph Puh the Battle Bear 8 Aug 2011 12:35
I not used any equations. I bruteforced through all possible differences, and if answer was not found then I was printing "5" (by advices from forum).
Re: Stupid problem... Clarification must be included in problem description!!!
Posted by Samelyuk Kirill 23 Oct 2013 01:14
Problem description is correct.
Try this test:
01.01 21.59
04.23 09.22

Answer:4
But I think your solution will print 5 because of this condition.
So people who got AC for this problem using this condition solved it incorrectly.

Edited by author 23.10.2013 01:14

Edited by author 23.10.2013 01:14
Re: Stupid problem... Clarification must be included in problem description!!!
Posted by mouse_wireless2 4 Apr 2018 17:53
I also tried bruteforce and on test 2 my program finds that there is no valid answer.
However, if I just return 5 in case of failure program gets acc. I'd really like to know what test 2 is.


By the way, my program outputs the correct answer on the test above.
Samelyuk Kirill wrote 23 October 2013 01:14
Try this test:
01.01 21.59
04.23 09.22

Answer:4