My issue
My code
#include <bits/stdc++.h>
using namespace std;
int b[200001];
int main() {
int t;
cin >>t;
for(int i=0;i<t;i++){
int n;
cin >>n;
int a[n];
int l,m;
l=0;
m=0;
for(int j=0;j<n;j++){
cin >>a[j];
b[a[j]]++;
if(b[a[j]]%2!=0){
m++;
}
else{
m--;
}
l=max(l,m);
}
for(int j=0;j<n;j++){
b[a[j]]=0;
}
cout<<l<<endl;
}
return 0;
}
Problem Link: CARDSWIPE Problem - CodeChef