Can someone plz help in identifying the failing test case

This was the 2nd ques of yesterday’s codeforces good bye 2020 round

#include <bits/stdc++.h>
using namespace std;
int main()
{
int t;
cin>>t;
while(t–)
{
int n;
cin>>n;sets;
int a[n];
for(int i=0;i<n;i++)
cin>>a[i];
sort(a,a+n);
for(int i=0;i<n-1;i++)
{
if(a[i+1]-a[i]==0)
a[i+1]++;
}
for(int i=0;i<n;i++)
s.insert(a[i]);
cout<<s.size()<<endl;
}
}

this was my code which failed on pretest 2. I need somebody to help me in pointing out the error