Can anyone point out the error?

```
#include<iostream>
#include<vector>
using namespace std;
vector<long int> a;
int search(long int b)
{
for(long int i = 0;i < a.size();i++)
if(a.at(i) == b) return 1;
return 0;
}
int main()
{
int T;
cin >> T;
for(int ctr = 0;ctr < T;ctr++)
{
long int n;
long int ans = 0;
cin >> n;
long int k;
for(long int i = 0;i < n;i++)
{
cin >> k;
if(search(k) == 0){ ans++;a.push_back(k);}
}
cout << ans << endl;
a.resize(0);
}
return 0;
}
```