#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

aa. There are NN heap stones here

bb. They took stones in turn

cc. Only take stones from both ends, take a heap each time

dd. Alice first

Format

Input

The first line is TT, TT is TestCase(0<T<=1000)(0 < T <= 1000)

The first line of each testcase is a number N(0<n<=100)N(0 < n <= 100)

The next line each contain NN integers xx indicating the number of each heap.(1x1000)(1 ≤ x ≤ 1000)

Output

Case #TestCase: answer

Answer is the most stones Alice got

Samples

1
4
1 2 3 4
Case #1: 6