#include <bits/stdc++.h>
using namespace std;
int main () {
int x;
cin >> x;
for (int i = 0; i < x; i++) {
int n,no=0;
cin>>n;
int a[n];
for(int j=0;j<n;j++){
cin>>a[j];
if(a[j]==1)
no++;
}
if(no%2!=0)
cout<<no<<endl;
else cout<<n-no<<endl;
}
}
Koi to mughe samjha do
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.