Codeforces-SolutionsA/1792A Gaming Forces/1792A.cpp
2023-06-08 00:01:28 +06:00

19 lines
295 B
C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
int t;
cin>>t;
while(t--)
{
int n,num1=0,h;
cin>>n;
for(int i=0;i<n;i++)
{
cin>>h;
if(h==1)
num1++;
}
cout<<n-(num1/2)<<endl;
}
}