1408_B. Arrays Sum
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.
```python
import sys as _sys


def main():
    t = int(input())
    for i_t in range(t):
        n, k = _read_ints()
        a = tuple(_read_ints())
        try:
            result = find_min_m(a, k)
        except ValueError:
            result = -1
        print(result)


def _read_line():
    result = _sys.stdin.readline()
    assert result[-1] == "\n"
    return result[:-1]


def _read_ints():
    return map(int, _read_line().split(" "))


def find_min_m(a_seq, k):
    assert k >= 1
    a_seq = tuple(a_seq)
    if a_seq.count(0) == len(a_seq):
        return 0
    steps_n = sum(x1 != x2 for x1, x2 in zip(a_seq, a_seq[1:]))
    
    if k == 1:
        if steps_n == 0:
            return 1
        else:
            raise ValueError("can't find min m")
    
    result = 0
    steps_per_b_seq = k - 1
    if a_seq[0] != 0:
        steps_n += 1
        if steps_n <= k:
            return 1
        steps_n -= k
        result += 1
    result += _ceil_div(steps_n, steps_per_b_seq)
    return result


def _ceil_div(x, y):
    assert y > 0
    result = x // y
    if x % y != 0:
        result += 1
    return result


if __name__ == '__main__':
    main()

```