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.

// Problem: B. Arrays Sum
// Contest: Codeforces - Grakn Forces 2020
// URL: http://codeforces.com/contest/1408/problem/B
// Memory Limit: 256 MB
// Time Limit: 1000 ms
// Powered by CP Editor (https://github.com/cpeditor/cpeditor)

import java.io.*;
import java.util.*;

public class Main {
    private static PrintWriter pw = new PrintWriter(System.out);
    private static InputReader sc = new InputReader();
    private static final int intmax = Integer.MAX_VALUE, intmin = Integer.MIN_VALUE;

    static class Pair{
        int first, second;
        Pair(int first, int second){
            this.first = first;
            this.second = second;
        }
    }

    static class InputReader{
        private static BufferedReader r = new BufferedReader(new InputStreamReader(System.in));
        private static StringTokenizer tk;

        private void next()throws IOException{
            while(tk == null || !tk.hasMoreTokens())   
                tk = new StringTokenizer(r.readLine());
        }

        private int nextInt()throws IOException{
            next();
            return Integer.parseInt(tk.nextToken());
        }

        private long nextLong()throws IOException{
            next();
            return Long.parseLong(tk.nextToken());
        }

        private String readString()throws IOException{
            next();
            return tk.nextToken();
        }

        private double nextDouble()throws IOException{
            next();
            return Double.parseDouble(tk.nextToken());
        }

        private int[] intArray(int n)throws IOException{
            next();
            int arr[] = new int[n];

            for(int i=0; i<n; i++)
                arr[i] = nextInt();

            return arr;
        }

        private long[] longArray(int n)throws IOException{
            next();
            long arr[] = new long[n];

            for(int i=0; i<n; i++)
                arr[i] = nextLong();

            return arr;
        }
    }

    public static void main(String args[])throws IOException{
        int t = sc.nextInt();
        while(t-->0)    solve();
        pw.flush();
        pw.close();
    }

    private static void solve()throws IOException{
		int n = sc.nextInt(), k = sc.nextInt(), a[] = sc.intArray(n), cnt = 1;
		
		for(int i = 1; i < n; i++){
			if(a[i] != a[i-1])
				cnt++;
		}
		
		if(k == 1){
			if(cnt == 1)	pw.println(1);
			else	pw.println(-1);
		}else{
			// int res = cnt/(k-1);
			int res = (int)Math.ceil((double)(cnt - k)/(k-1)) + 1;
			pw.println(Math.max(1, res));
		}
    }
}