|
|
back to boardShow all messages Hide all messagesWhy if there is no answer, we should print "5"? It must be included in problem description!!! 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 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). 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 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. Try this test: 01.01 21.59 04.23 09.22 Answer:4 |
|
|