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.util.*;
import java.io.*;
//import java.lang.*;

public class ranjan{

    public static Read cin;
    //public static InputReader cin;
    public static PrintWriter cout;
    public static boolean[] safe;
	public static int[][] memo;
    public static final long bil = (long)1e9+7;
    public static int fileread = 0; 
    
    public static void main(String ...arg) throws IOException
    {
        /*console writer*/
        cout = new PrintWriter(new BufferedOutputStream(System.out));
        /*Debug Reader*/
        //Scan cin =new Scan();
        if(fileread == 1)
        {
            try
            {
            cin = new Read(new FileInputStream(new File("in1.txt")));
            //cin = new InputReader(new FileInputStream(new File("in1.txt")));
            }
            catch (IOException error){}
        }
        else{
            cin = new Read(System.in);
            //cin = new InputReader(System.in);
        }

        int t = cin.nextInt();
        while(t-->0)
        {
            //input
            int n = cin.nextInt();
            int k = cin.nextInt();
            int[] a = new int[n];
            for(int i=0;i<n;i++) a[i] = cin.nextInt();

            int ans = 0;
            //process
            if(k==1)
            {
                int temp = a[0],i=0;
                ans = 1;
                while(++i<n)
                {
                    if(a[i]!=temp)
                    {
                        ans = -1;
                        break;
                    }
                }
            }
            else
            {
                int dis = 1,i=0;
                while(dis<=k && ++i<n)
                {
                    if(a[i]!=a[i-1])
                        dis++;
                }
                ans++;
                while(i<n)
                {
                    //dis = (a[i]!=0)?1:0;
                    dis = 1;
                    if(a[i]!=a[i-1])
                        dis++;
                    while(dis<=k && ++i<n)
                    {
                        if(a[i]!=a[i-1])
                            dis++;
                    }
                    ans++;
                }
            }
            cout.print(ans+"\n");
        }
        

		cout.close();
    }


	private static class Pair{
		public int a,b;
		public Pair(int a,int b)
		{
			this.a = a;
			this.b = b;
		}	
	}


    /*public static void seive(int size)
    {
        prime[0] = prime[1] = false;
        int p = 2;
        while(p*p<= size)
        {
            if(prime[p])
            {
                for(int i=p*p;i<size;i += p)
                    prime[i] = false;
            }
            p++;
        }
    }*/


    public static <K, V> V getOrDefault(HashMap<K,V> map, K key, V defaultValue) {
        return map.containsKey(key) ? map.get(key) : defaultValue;
    }
    
    static void reverseArray(int intArray[], int size) 
    { 
        int i, temp; 
        for (i = 0; i < size / 2; i++) { 
            temp = intArray[i]; 
            intArray[i] = intArray[size - i - 1]; 
            intArray[size - i - 1] = temp; 
        }  
    } 

    public static long mod_pow(long x,long n,long mod) {
        long res=1;
        while(n>0) {
            if((n&1)==1)res=res*x%mod;
            x=x*x%mod;
            n>>=1;
        }
        return res;
    }
    public static int gcd(int n1, int n2) 
    {
        int r;
        while (n2 != 0) 
        {
            r = n1 % n2;
            n1 = n2;
            n2 = r;
        }
        return n1;
    }
 
    /*public static int lcm(int n1, int n2) 
    {
        int answer = (n1 * n2) / (gcd(n1, n2));
        return answer;
    }*/


    static class InputReader {
        final InputStream is;
        final byte[] buf = new byte[1024];
        int pos;
        int size;
 
        public InputReader(InputStream is) {
            this.is = is;
        }
 
        public int nextInt() {
            int c = read();
            while (isWhitespace(c))
                c = read();
            int sign = 1;
            if (c == '-') {
                sign = -1;
                c = read();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res = res * 10 + c - '0';
                c = read();
            } while (!isWhitespace(c));
            return res * sign;
        }
 
        int read() {
            if (size == -1)
                throw new InputMismatchException();
            if (pos >= size) {
                pos = 0;
                try {
                    size = is.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (size <= 0)
                    return -1;
            }
            return buf[pos++] & 255;
        }
 
        static boolean isWhitespace(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }
 
    }

static class RecursionLimiter {
    public static long maxLevel = 100000L;

    public static void emerge() {
        if (maxLevel == 0)
            return;
        try {
            throw new IllegalStateException("Too deep, emerging");
        } catch (IllegalStateException e) {
            if (e.getStackTrace().length > maxLevel + 1)
                throw e;
        }
    }
}


static class Scan {
        private byte[] buf=new byte[1024];
        private int index;
        private InputStream in;
        private int total;
        public Scan()
        {
            in=System.in;
        }
        public int scan()throws IOException
        {
            if(total<0)
            throw new InputMismatchException();
            if(index>=total)
            {
                index=0;
                total=in.read(buf);
                if(total<=0)
                return -1;
            }
            return buf[index++];
        }
        public int scanInt()throws IOException
        {
            int integer=0;
            int n=scan();
            while(isWhiteSpace(n))
            n=scan();
            int neg=1;
            if(n=='-')
            {
                neg=-1;
                n=scan();
            }
            while(!isWhiteSpace(n))
            {
                if(n>='0'&&n<='9')
                {
                    integer*=10;
                    integer+=n-'0';
                    n=scan();
                }
                else throw new InputMismatchException();
            }
            return neg*integer;
        }
        public double scanDouble()throws IOException
        {
            double doub=0;
            int n=scan();
            while(isWhiteSpace(n))
            n=scan();
            int neg=1;
            if(n=='-')
            {
                neg=-1;
                n=scan();
            }
            while(!isWhiteSpace(n)&&n!='.')
            {
                if(n>='0'&&n<='9')
                {
                    doub*=10;
                    doub+=n-'0';
                    n=scan();
                }
                else throw new InputMismatchException();
            }
            if(n=='.')
            {
                n=scan();
                double temp=1;
                while(!isWhiteSpace(n))
                {
                    if(n>='0'&&n<='9')
                    {
                        temp/=10;
                        doub+=(n-'0')*temp;
                        n=scan();
                    }
                    else throw new InputMismatchException();
                }
            }
            return doub*neg;
        }
        public String scanString()throws IOException
        {
            StringBuilder sb=new StringBuilder();
            int n=scan();
            while(isWhiteSpace(n))
            n=scan();
            while(!isWhiteSpace(n))
            {
                sb.append((char)n);
                n=scan();
            }
            return sb.toString();
        }
        private boolean isWhiteSpace(int n)
        {
            if(n==' '||n=='\n'||n=='\r'||n=='\t'||n==-1)
            return true;
            return false;
        }
    }

}

class Read
{
    private BufferedReader br;
    private StringTokenizer st;

    public Read(InputStream is)
    { br = new BufferedReader(new InputStreamReader(is)); }

    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;
    }
}

