You are given a non-decreasing array of non-negative integers a_1, a_2, …, a_n. Also you are given a positive integer k.

You want to find m non-decreasing arrays of non-negative integers b_1, b_2, …, b_m, such that:

  * The size of b_i is equal to n for all 1 ≤ i ≤ m. 
  * For all 1 ≤ j ≤ n, a_j = b_{1, j} + b_{2, j} + … + b_{m, j}. In the other word, array a is the sum of arrays b_i. 
  * The number of different elements in the array b_i is at most k for all 1 ≤ i ≤ m. 



Find the minimum possible value of m, or report that there is no possible m.

Input

The first line contains one integer t (1 ≤ t ≤ 100): the number of test cases.

The first line of each test case contains two integers n, k (1 ≤ n ≤ 100, 1 ≤ k ≤ n).

The second line contains n integers a_1, a_2, …, a_n (0 ≤ a_1 ≤ a_2 ≤ … ≤ a_n ≤ 100, a_n > 0).

Output

For each test case print a single integer: the minimum possible value of m. If there is no such m, print -1.

Example

Input


6
4 1
0 0 0 1
3 1
3 3 3
11 3
0 1 2 2 3 3 3 4 4 4 4
5 3
1 2 3 4 5
9 4
2 2 3 5 7 11 13 13 17
10 7
0 1 1 2 3 3 4 5 5 6


Output


-1
1
2
2
2
1

Note

In the first test case, there is no possible m, because all elements of all arrays should be equal to 0. But in this case, it is impossible to get a_4 = 1 as the sum of zeros.

In the second test case, we can take b_1 = [3, 3, 3]. 1 is the smallest possible value of m.

In the third test case, we can take b_1 = [0, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2] and b_2 = [0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2]. It's easy to see, that a_i = b_{1, i} + b_{2, i} for all i and the number of different elements in b_1 and in b_2 is equal to 3 (so it is at most 3). It can be proven that 2 is the smallest possible value of m.
import java.io.*;
import java.util.*;
public class MyClass {
    
    public static void main(String args[]) {
      FastReader sc = new FastReader();     //For Fast IO
      func f = new func();                  //Call func for swap , permute, upper bound and for sort.
      int t = sc.nextInt();
      while(t-->0){
          int n = sc.nextInt();
          int k = sc.nextInt();
          HashSet<Integer> hs = new HashSet<>();
          for(int i=0;i<n;i++){
              int x = sc.nextInt();
              hs.add(x);
          }
          int count=hs.size();
          if(k==1){
              if(count==1){
                  System.out.println(1);
              }
              else{
                  System.out.println(-1);
              }
          }
          else{
              if(count<=k){
                  System.out.println(1);
              }
              else{
                  int ans=0;
                  count -= k;
                  ans++;
                  ans += count/(k-1);
                  if((count%(k-1))!=0){
                      ans += 1;
                  }
                  System.out.println(ans);
              }
          }
      }
    }
}
class Pair{
    int x;
    int y;
    Pair(int i,int j){
        x=i;
        y=j;
    }
    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof Pair)) return false;
        Pair key = (Pair) o;
        return x == key.x && y == key.y;
    }
    @Override
    public int hashCode() {
        int result = x;
        result = 31*result + y;
        return result;
    }
}
class FastReader 
	{ 
		BufferedReader br; 
		StringTokenizer st; 
 
		public FastReader() 
		{ 
			br = new BufferedReader(new
					InputStreamReader(System.in)); 
		} 
 
		String next() 
		{ 
			while (st == null || !st.hasMoreElements()) 
			{ 
				try
				{ 
					st = new StringTokenizer(br.readLine()); 
				} 
				catch (IOException e) 
				{ 
					e.printStackTrace(); 
				} 
			} 
			return st.nextToken(); 
		} 
 
		int nextInt() 
		{ 
			return Integer.parseInt(next()); 
		} 
 
		long nextLong() 
		{ 
			return Long.parseLong(next()); 
		} 
 
		double nextDouble() 
		{ 
			return Double.parseDouble(next()); 
		} 
 
		String nextLine() 
		{ 
			String str = ""; 
			try
			{ 
				str = br.readLine(); 
			} 
			catch (IOException e) 
			{ 
				e.printStackTrace(); 
			} 
			return str; 
		} 
	}
class func{
    static ArrayList<String> al = new ArrayList<>();
        public static void sort(long[] arr) {
            int n = arr.length, mid, h, s, l, i, j, k;
            long[] res = new long[n];
            for (s = 1; s < n; s <<= 1) {
                for (l = 0; l < n - 1; l += (s << 1)) {
                    h = Math.min(l + (s << 1) - 1, n - 1);
                    mid = Math.min(l + s - 1, n - 1);
                    i = l;
                    j = mid + 1;
                    k = l;
                    while (i <= mid && j <= h) res[k++] = (arr[i] <= arr[j] ? arr[i++] : arr[j++]);
                    while (i <= mid) res[k++] = arr[i++];
                    while (j <= h) res[k++] = arr[j++];
                    for (k = l; k <= h; k++) arr[k] = res[k];
                }
            }
        }
        public static void permute(char a[] , int i , int n){
            if(i==n-1){
                String s = new String(a);
                al.add(s);                      // al stores all permutations of string. 
                return;
            }
            for(int j=i;j<n;j++){
                swap(a,i,j);
                permute(a,i+1,n);
                swap(a,i,j);
            }
        }
        public static void swap(char a[],int i, int j){
            char temp = a[i];
            a[i] = a[j];
            a[j] = temp;
        }
        public static void swap(int a[],int i, int j){
            int temp = a[i];
            a[i] = a[j];
            a[j] = temp;
        }
		//-It returns index of first element which is strictly greater than searched value.
		public static int upperBound(long[] array, int length, long value) {
            int low = 0;
            int high = length;
            while (low < high) {
                final int mid = (low + high) / 2;
                if (value >= array[mid]) {
                    low = mid + 1;
                } else {
                    high = mid;
                }
        }
        return low;
    }
	/*If searched element doesn't exist function returns index of first element which is bigger than searched value.<br>
 * -If searched element is bigger than any array element function returns first index after last element.<br>
 * -If searched element is lower than any array element function returns index of first element.<br>
 * -If there are many values equals searched value function returns first occurrence.<br>*/
	public static int lowerBound(long[] array, int length, long value) {
        int low = 0;
        int high = length;
        while (low < high) {
            final int mid = (low + high) / 2;
            if (value <= array[mid]) {
                high = mid;
            } else {
                low = mid + 1;
            }
        }
        return low;
    }
        
 
}



	 	 
