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

Some clarifications that might help you
Posted by hopeless dreamer 17 Feb 2014 04:33
First of all, yes, the two players can be in the same cell, even at the beginning of the game. That only means that the first player that arrived there will take its value.
Test:
5
1 2 3 4 5
1 1
Answer:
15 0

Test:
5
1 2 3 4 5
5 5
Answer:
15 0
Re: Some clarifications that might help you
Posted by hopeless dreamer 17 Feb 2014 04:38
Secondly, both players play optimally, so it is not a good idea to try and solve this problem using greedy methods. Furthermore, it is not even necessary to try and iterate each move. It suffices to find a technique that applies for each game and then it all reduces to computing a simple sum:) Good luck!