You are viewing a single comment's thread. Return to all comments →
Buddy, I did the same, but with simply arrays. Not boolean. Could u pls tell me where I went wrong?
int main(){ int n,i,flag[100]={0},count=0,sock; cin>>n; while(n--) { cin>>sock; flag[sock]++; } for(i=0;i<100;i++) { if((flag[i]%2==0) && flag[i]!=0) count++; } cout<<count; return 0; }
Seems like cookies are disabled on this browser, please enable them to open this website
Sales by Match
You are viewing a single comment's thread. Return to all comments →
Buddy, I did the same, but with simply arrays. Not boolean. Could u pls tell me where I went wrong?