ENG  RUSTimus Online Judge
Online Judge
Задачи
Авторы
Соревнования
О системе
Часто задаваемые вопросы
Новости сайта
Форум
Ссылки
Архив задач
Отправить на проверку
Состояние проверки
Руководство
Регистрация
Исправить данные
Рейтинг авторов
Текущее соревнование
Расписание
Прошедшие соревнования
Правила
вернуться в форум

Обсуждение задачи 2000. Grand Theft Array V

Some clarifications that might help you
Послано hopeless dreamer 17 фев 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
Послано hopeless dreamer 17 фев 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!