You are playing a game of Pick It. You are given a list of
positive integers, and you are allowed to select any number other than the
first or last number in this list. When you pick a number, that number
is removed from the board, and your score increases by the sum of the
number that you picked and the sum of the neighbouring numbers.
For example, if the list contained 1 2 3 4 5, and you picked 3, your score would be 2+3+4=9. On the next turn, your list would be 1 2 4 5, and if you picked 4 next, your score would be 9+2+4+5 = 20, leaving you with the list 1 2 5. The game concludes when there are only two numbers remaining.
Given a list of numbers, what is the maximum score that you can obtain?
5 1 2 3 4 5 5 2 1 5 3 4 6 30 20 40 50 70 60 0
30 31 570