GO4DIMON - GO FOR DIAMONDS
Once upon a time there was a diamond shaped forest full of diamonds.
A lonely traveler wants to collect maximum diamonds from the forest. He travels from the initial postion to the destination as shown in the figure. From each cell he can move to any cell which shares an edge with it. He cannot travel backwards. Find the diamonds collected by the wise traveler who has the map of the forest.
The first line consists of an integer t, the number of test cases. Each test case consists of an integer n, the order of the diamond (n is always odd) followed by the description of the map.
For each testcase print the no. of diamonds collected by the wise traveler.
1<=n<=200 and n is odd
6 5 4
15 21 3