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

reshke WA27 [3] // Problem 2065. Different Sums 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
Combatcook Re: WA27 [2] // Problem 2065. Different Sums 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
reshke Re: WA27 [1] // Problem 2065. Different Sums 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....?
Combatcook Re: WA27 // Problem 2065. Different Sums 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?