Codeforces-SolutionsA/Codes/1792 A - Gaming Forces/1792A.cpp

19 lines
295 B
C++
Raw Normal View History

2023-06-08 02:01:28 +08:00
#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;
}
}