mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
Create 1009.cpp
This commit is contained in:
parent
c07eeeb284
commit
425180d386
33
HDOJ/Multi-University Training Contest/2017/Team 4/1009.cpp
Normal file
33
HDOJ/Multi-University Training Contest/2017/Team 4/1009.cpp
Normal file
|
@ -0,0 +1,33 @@
|
|||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
using namespace std;
|
||||
|
||||
int main()
|
||||
{
|
||||
int t;
|
||||
scanf("%d",&t);
|
||||
while(t--)
|
||||
{
|
||||
int n;
|
||||
scanf("%d",&n);
|
||||
|
||||
int cnt=0;
|
||||
int x;
|
||||
for(int i=0;i<n;i++)
|
||||
{
|
||||
scanf("%d",&x);
|
||||
if(x%2==1) ++cnt;
|
||||
}
|
||||
|
||||
if(cnt>=n-cnt)
|
||||
{
|
||||
printf("2 1\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("2 0\n");
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user