Given an array A of size N, the task is to check if the given array represents a Binary Max Heap.
The first line of input contains an integer T denoting the number of test cases. Then T test cases follow. Each test case contains two lines. The first line of input contains an integer N denoting the size of the array. Then in the next line are N space separated array elements.
If array represents a Binary Max Heap, print "1", else print "0" (without quotes).
1 <= T <= 100
1 <= N <= 107
1 <= Ai <= 1015