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*