IOI '96 - Veszprém, Hungary
Consider the following two-player game played with a sequence of
Write a program that implements the optimal strategy. The optimal
strategy yields maximum points when playing against the "best possible"
opponent. Your program must further implement an optimal strategy for
player
Input Specification
Line
Output Specification
Two space-separated integers on a line: the score of player
Sample Input
6
4 7 2 9 5 2
Sample Output
18 11
Comments
Note that it seems that the board is not guaranteed to be inputted on one line and may be a few lines long