Given a sorted array arr of size N without duplicates, and given a value x. Find the floor of x in given array. Floor of x is defined as the largest element K in arr such that K is smaller than or equal to x.
First line of input contains number of testcases T. For each testcase, first line of input contains number of elements in the array and element whose floor is to be searched. Last line of input contains array elements.
Output the index of floor of x if exists, else print -1.
1 ≤ T ≤ 100
1 ≤ N ≤ 107
1 ≤ arr[i] ≤ 1018
0 ≤ X ≤arr[n-1]