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 2000. Grand Theft Array V

WA #5
Posted by Anton Malyuta 16 Nov 2013 14:12
My algorithm finds the numbers on the left and right, and then compares them, and takes a step toward greater. But if the sum is equal, it compares to one until it finds one larger (and goes upwards). If comparing the results in one step, then goes in the direction of the enemy.

What's wrong?
Re: WA #5
Posted by Smilodon_am [Obninsk INPE] 16 Nov 2013 15:54
Try these tests
first test:
10
0 0 1 10 5 100 5 1 0 0
3 8
answer:
16 106

second test
10
0 0 1 100 5 10 5 1 0 0
3 8
106 16
answer:
106 16
Re: WA #5
Posted by Anton Malyuta 16 Nov 2013 17:01
I am slowpock.
I go AC.

Edited by author 17.11.2013 02:14