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 2065. Different Sums

WA27
Posted by reshke 25 Aug 2016 20:07
My algo generate array like [1, -1, 2, -2, 3, -3 ...,0], but i got WA27
Any suggetion's?
(Bad english)

Edited by author 25.08.2016 23:47
Re: WA27
Posted by Combatcook 26 Aug 2016 12:07
You need array like [..., -3, 3, -2, 2, -1, 1, 0], i.e. move all zeros to the beginning of your array, and you'll get AC.

Edited by author 26.08.2016 12:12
Re: WA27
Posted by reshke 28 Aug 2016 19:05
I don't understand why, but it does not work anyway.
Should be output be like 0 1 -1 2 -2 3 -3 4 -4....?
Re: WA27
Posted by Combatcook 28 Aug 2016 22:12
My AC program gives answers like (0...0 1 -1 2 -2 3 -3...), but your one - (0 1 -1 2 -2 3 -3 ... n -n ... -n), as I understand. Do you see the difference?