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 1841. Cableways

Need help with test #10. WA10
Posted by FreezingCool 19 Sep 2011 02:43
Can anyone that had problem with test #10 help me pass it? I've been trying for a few hours and I can't find where am I mistaken.
Re: Need help with test #10. WA10
Posted by bsu.mmf.team 19 Sep 2011 19:59
I had WA# 10 too, because I chose my constant INFINITY as 10^15. But the answer may be up to 2*10^17, for example, in the test
100000
1000000 -1000000 1000000 ... -1000000 1000000
1000000 0
1000000 0
...
1000000 0
After changing INFINITY to 10^18 I got AC :)
So, maybe, you have the same mistake. Check it.

Edited by author 19.09.2011 21:35
Re: Need help with test #10. WA10
Posted by FreezingCool 21 Sep 2011 00:28
Yeah, that was the problem for test #10. Now having WA#13. I think I am going to retype the whole program again and use all long long since I think the problem is with some long long calculations.

Thanks
Re: Need help with test #10. WA10
Posted by Yermak 21 Sep 2011 00:39
Try something like this:
3
0 3 0 3
1 1 2 1
1 1 1 1
1 0

Answer is 7.
Re: Need help with test #10. WA10
Posted by FreezingCool 23 Sep 2011 16:37
My program answers 7 for that case, too.
Re: Need help with test #10. WA10
Posted by FreezingCool 23 Sep 2011 18:18
I don't know where the bug was, but I got AC by typing the whole code again. Probably have put int somewhere instead of long long.