solved with min-max search, but i can't find an example on

how to implement this algorithm.

Game

Two players are playing this game: There are n numbers (n<=128), ordered in a row.

The first player takes one number from the left or the right side.

Then the second player takes one number from the left or the right

side of the rest of the numbers.

In this way they take the numbers, until there are no numbers left. What is

the maximum sum of the numbers that the first player has taken, if the both

players are playing optimal.

input:

first line: n - the number of numbers

second lind: n numbers, of which a

*<= 100*

output:

the maximum sum of numbers that the first player can take

output:

the maximum sum of numbers that the first player can take