Given an array of N integers
You have to transform the array, for every i(1≤i≤N): a[i]=a[i]%2
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 T, the number of test cases 1≤T≤103
The second line contains N, the number of array elements 1≤N≤105
The third line contains N integers, the array elements 1≤a[i]≤109
Output:
For all test cases print 1 if the array can be converted into a palindrome or else print 0
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