#SDNU1261. Problem I. Alice and Bob II
Problem I. Alice and Bob II
Description
Alice have a friend Bob, they both smart,Today they are going to play a new game again
. There are heap stones here
. They took stones in turn
. Only take stones from both ends, take a heap each time
. Alice first
Format
Input
The first line is , is TestCase
The first line of each testcase is a number
The next line each contain integers indicating the number of each heap.
Output
Case #TestCase: answer
Answer is the most stones Alice got
Samples
1
4
1 2 3 4
Case #1: 6