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 1438. Time Limit Exceeded

В условии задачи тест #2 неправильный
Posted by SUrSU#3 25 Feb 2006 17:56
Sample output #2
0
Program terminated. Variables state:
Value: 2     <-один из остатков должен быть отрицательным
ValueA: 2    <-т.к. делимое - отрицательное
value: -25000000  <- не может быть. значение может быть 2 500 000, т.к. ограничение на кол-во исполняемых команд 10 000 000.
Re: В условии задачи тест #2 неправильный
Posted by Denis Nazarov 25 Feb 2006 17:58
Это не конест, а ботва какая-то :((
Наверное, кол-во исполняемых команд должно быть 100 000 000. Но все равно второй тест неверный!
Re: В условии задачи тест #2 неправильный
Posted by Aleksandr Klepinin 25 Feb 2006 22:57
Test is correct. There was a misprint in number of commands to be executed (fixed now, see problem statement).

The second sample is also quite correct. Just try to look at it and understand how remainder must be calculated (yes, it differs from usual implementation so popular in programming languages)
Re: В условии задачи тест #2 неправильный
Posted by Denis Nazarov 26 Feb 2006 01:54
Can you explain more clearly you definition of your mod function? I cann't understand why

Value :   -25000000 mod 6 = 2
ValueA:   -24999999 mod -6 = 2

May be you should check judge data one more time?
Re: В условии задачи тест #2 неправильный
Posted by Ivankov Dmitry 26 Feb 2006 02:09
I suppose (1E8 + 1) commands must be executed
Re: В условии задачи тест #2 неправильный
Posted by Aleksandr Klepinin 26 Feb 2006 11:11
Yes, Dmitry, you are right. Shame on me: wrong order of conditions in while loop. :)

Ayway, test is correct, assuming, that program was terminated after 1e8+1 commands have been executed (it will allow to understand how % works).

I will update sample and tests soon.