题目描述
Read problems statements [Bengali] , [Mandarin chinese] , [Russian] and [Vietnamese] as well.
You are given an integer sequence $A$ with length $N$. In one move, you are allowed to choose one element of this sequence and change it to an arbitrary integer. Compute the minimum number of moves needed to make the sequence a permutation of the integers $1$ through $N$.
------ Input ------
The first line of the input contains a single integer $T$ denoting the number of test cases. The description of $T$ test cases follows.
The first line of each test case contains a single integer $N$.
The second line contains $N$ space-separated integers $A_{1}, A_{2}, \dots, A_{N}$.
------ Output ------
For each test case, print a single line containing one integer — the minimum required number of moves.
------ Constraints ------
$1 ≤ T ≤ 100$
$1 ≤ N ≤ 10^{5}$
the sum of $N$ for all test cases does not exceed $2 \cdot 10^{5}$
$1 ≤ A_{i} ≤ 10^{9}$ for each valid $i$
----- Sample Input 1 ------
2
4
1 2 3 3
3
2 6 2
----- Sample Output 1 ------
1
2
----- explanation 1 ------
Example case 1: One possible way is to change the last element to $4$. This creates the sequence $1, 2, 3, 4$, which is a permutation.
Example case 2: We can change the first element to $1$ and the second element to $3$, creating the permutation $1, 3, 2$.
输入格式
见题面
输出格式
见题面