Given an array of integers
You have to transform the array, for every :
For example: if the given array is 3,4,5 then after the transformation the array will be 1,0,1
Your task is to convert the array into a palindrome and for that you can re-arrange the elements however you wish
Is it possible to convert the array into a palindrome?
Input :
The first line contains , the number of test cases
The second line contains , the number of array elements
The third line contains integers, the array elements
Output:
For all test cases print if the array can be converted into a palindrome or else print
For test case 1, the array will be transformed into 1,1,1 after mod with 2,
The array is already a palindrome, so the output is 1
For test case 2, the array after transformation will be 1,0,1,1,1,1
Now no matter how you try to arrange them, it is impossible to convert the array into a palindrome,that's why the output is 0