Problem: You are given an array of non-negative integers. In one operation you can change any number in the array to any other non-negative integer.
Let's define the cost of the array as , where of a set of non-negative integers is the smallest non-negative integer not present in the set, and is the number of different numbers in the array.
For example, , .
You should find the minimal cost of the array if you are allowed to make at most operations.
Input Format: The input consists of multiple test cases. The first line contains a single integer () — the number of test cases. Description of the test cases follows.
The first line of each test case contains two integers and (, ) — the length of the array and the number of operations that you are allowed to make.
The second line of each test case contains integers () — the elements of the array .
It is guaranteed that the sum of over all test cases does not exceed .
Output Format: For each test case output a single integer — minimal cost that it is possible to get making at most operations.
Note: In the first test case no operations are needed to minimize the value of .
In the second test case it is possible to replace by . After that the array is , , , so the answer is .
In the third test case one possible array is , , .
In the fourth test case one possible array is .