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 1587. Flying Pig

WA 7
Posted by Marginean Ciprian 23 Feb 2010 20:40
Maybe someone could give me some tests to find the bug in my program. I have tried the tests on this forum(and others) and it provides the correct answer(for those tests).
L.E.: Never mind, I got accepted. Using an automated test generator, which I wrote, I found that my program failed to provide a correct answer on the following test:
//Input
2
-1 -1
//Correct Output
1
//My Output
-1
And obviously, it failed all tests of the type
n
-1 -1 ... -1
by providing the answer -1. Maybe this will help others of wasting a few days on the problem.

Edited by author 23.02.2010 21:27