You are given a binary array A of N elements. The array consists of 0's and 1's. You can perform the following operations as many times as possible:
Determine the minimum number of operations to delete the entire array.
Input format
Output Format
Print T lines and for each test case:
Constraints
1≤T≤20000
1≤N≤200000
0≤Ai≤1
First test case: Entire array can be deleted in one operation as [0,0,1,1] has no inversions.
Second test case: You can delete the entire array in two operations in first [1] and in second [0], you can not do it one as [1,0] has inversions.
Third test case: You can do this in one operation as array includes no inversions.
Note: You always need to delete the subarray from 0th index (0-based indexing).