{"trustable":false,"sections":[{"title":"","value":{"format":"MD","content":"Masum and Nahid are playing a two player game. Initially, there are **n** integer numbers in an array and Masum and Nahid take turns alternatively. Each player can take one or more numbers from the left-end or the right-end of the array but cannot take from both ends in one turn. A player can take as many consecutive numbers as he/she wants during the turn. The game ends when all numbers are taken from the array.\n\nThe point of each player is calculated by the summation of the numbers the player has taken. Each player tries to achieve as much points as possible. If both Masum and Nahid play optimally and Masum starts the game, how much more point can Masum get than Nahid?"}},{"title":"Input","value":{"format":"MD","content":"Input starts with an integer **T (\u0026le; 100)**, denoting the number of test cases.\n\nEach case contains a blank line and an integer **N (1 \u0026le; N \u0026le; 100)** denoting the size of the array. The next line contains **N** space separated integers. You may assume that no number will contain more than **4** digits."}},{"title":"Output","value":{"format":"MD","content":"For each test case, print the case number and the maximum difference Masum will be able to make after playing this game optimally."}},{"title":"Sample","value":{"format":"MD","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e2\n\n4\n4 -10 -20 7\n\n4\n1 2 3 4\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eCase 1: 7\nCase 2: 10\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}