my code is giving WA but i am not getting what is the error as all test cases are satisfied made by me

the link to the problem is

and my solution is

Blockquote

#include<bits/stdc++.h>

using namespace std;

int main()

{

```
long long int t;
cin>>t;
while(t--)
{
long long int n;
cin>>n;
long long int arr[n];
for(long long int i=0;i<n;i++)
{
cin>>arr[i];
}
sort(arr,arr+n);
long long int count=0;
for(long long int i=0;i<n;i++)
{
if(arr[i]!=i+1)
count++;
}
cout<<count<<endl;
}
```

}