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 Today {
	static void solve() throws IOException {
		int n = nextInt(), k = nextInt(), tmp, ans, l, a[] = new int[n];
		HashSet<Integer> s = new HashSet<>();
		for(int i = 0; i < n; i++) {
			a[i] = nextInt();
			s.add(a[i]);
		}
		l = s.size();

		if((k >= l) || (k == 1 && l == 1))
			out.println(1);
		else if(k == 1 && l != 1)
			out.println(-1);
		else {
			l = l - k;
			k--;
			ans = 1;
			tmp = l / k;
			if(tmp * k != l)
				tmp++;
			out.println(ans + tmp);
		}
	}

	static void reverse(long a[], int start, int end) {
		--end;
		long temp;
		while(start < end) {
			temp = a[start];
			a[start++] = a[end];
			a[end--] = temp;
		}
	}

	public static void main(String args[]) throws IOException {
		br = new BufferedReader(new InputStreamReader(System.in));
		out = new PrintWriter(new BufferedOutputStream(System.out));
		// sieve();
		int tt = 1;
		tt = nextInt();
		for (int test = 1; test <= tt; ++test) {
			// out.print("Case #" + test + ": ");
			solve();
		}
		out.close();
	}

	static class Pair implements Comparable<Pair> {
		long first, second;

		Pair(long a, long b) {
			first = a;
			second = b;
		}

		public int compareTo(Pair p) {
			int cmp = Long.compare(this.first, p.first);
			if(cmp != 0)
				return cmp;
			return Long.compare(this.second, p.second);
		}

		public boolean equals(Object p) {
			Pair p1 = (Pair) p;
			return (first == p1.first && second == p1.second);
		}

		public String toString() {
			return this.first + " " + this.second;
		}

		public int hashCode() {
			return (int) ((1l * (inf + 1) * this.first + this.second) % mod);
		}
	}

	static boolean arraySortedOrNot(int a[], int n) {
		if (n == 1 || n == 0)
			return true;
		if (a[n - 1] < a[n - 2])
			return false;
		return arraySortedOrNot(a, n - 1);
	}

	static void swap(int a[], int i, int j) {
		int temp = a[i];
		a[i] = a[j];
		a[j] = temp;
	}

	static long binaryExpo(long a, long b) {
		if (a == 1)
			return 1;
		long res = 1;
		a = a % mod;
		while (b != 0) {
			if ((b & 1) != 0) {
				res = (res % mod * a % mod) % mod;
			}
			a = (a % mod * a % mod) % mod;
			b >>= 1;
		}
		return res;
	}

	static boolean isPerfectSquare(long x) {
		double sr = Math.sqrt(x);
		return ((sr - Math.floor(sr)) == 0);
	}

	static long isPowerOfTwo(long n) {
		if (n == 0)
			return -1;
		long count = 0;

		while (n != 1) {
			++count;
			if (n % 2 != 0)
				return -1;
			n = n / 2;
		}
		return count;
	}

	static final long mod = (long) (1e9 + 7);
	static final int inf = (int) (1e9 + 1);

	public static int lowerBound(int[] array, int length, int 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;
	}

	public static int upperBound(int[] array, int length, int 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;
	}

	static int gcd(int a, int b) {
		if (a == 0)
			return b;
		return gcd(b % a, a);
	}

	static BufferedReader br;
	static StringTokenizer st;
	static PrintWriter out;

	static String next() {
		while (st == null || !st.hasMoreElements()) {
			try {
				st = new StringTokenizer(br.readLine());
			} catch (IOException e) {
				e.printStackTrace();
			}
		}
		return st.nextToken();
	}

	static int nextInt() {
		return Integer.parseInt(next());
	}

	static long nextLong() {
		return Long.parseLong(next());
	}

	static double nextDouble() {
		return Double.parseDouble(next());
	}

	static String nextLine() {
		String str = "";
		try {
			str = br.readLine();
		} catch (IOException e) {
			e.printStackTrace();
		}
		return str;
	}

	static int[] nextIntArray(int n) {
		int a[] = new int[n];
		for (int i = 0; i < n; i++) {
			a[i] = nextInt();
		}
		return a;
	}

	static long[] nextLongArray(int n) {
		long a[] = new long[n];
		for (int i = 0; i < n; i++) {
			a[i] = nextLong();
		}
		return a;
	}

	static int[] memset(int n, int val) {
		int ar[] = new int[n];
		Arrays.fill(ar, val);
		return ar;
	}

	static void debug(Object... a) {
		System.out.print("> ");
		for (int i = 0; i < a.length; i++)
			System.out.print(a[i] + " ");
		System.out.println();
	}

	static void debug(int a[]) {
		debugnsp(Arrays.stream(a).boxed().toArray());
	}

	static void debug(long a[]) {
		debugnsp(Arrays.stream(a).boxed().toArray());
	}

	static void debugnsp(Object a[]) {
		System.out.print("> ");
		for (int i = 0; i < a.length; i++)
			System.out.print(a[i] + " ");
		System.out.println();
	}

	static class UnionFind {
		int[] parents;
		int count;

		UnionFind(int n) {
			parents = new int[n];
			for (int i = 0; i < n; ++i)
				parents[i] = i;
			count = n;
		}

		int find(int i) {
			if (parents[i] == i)
				return i;
			return parents[i] = find(parents[i]);
		}

		void union(int i, int j) {
			int a = find(i);
			int b = find(j);
			if (a != b) {
				parents[a] = b;
				--count;
			}
		}
	}

	// static final int MAXN = 100001;
	// static int spf[] = new int[MAXN];

	// static void sieve() {
	// spf[1] = 1;
	// for (int i = 2; i < MAXN; i++)
	// spf[i] = i;
	// for (int i = 4; i < MAXN; i += 2)
	// spf[i] = 2;

	// for (int i = 3; i * i < MAXN; i++) {
	// if (spf[i] == i) {
	// for (int j = i * i; j < MAXN; j += i)
	// if (spf[j] == j)
	// spf[j] = i;
	// }
	// }
	// }
}

/*
 * Jai Sita Ram Ji
 *
 * @author: Nishchal Siddharth Pandey
 */
