-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path1857_A.cpp
More file actions
38 lines (37 loc) · 704 Bytes
/
1857_A.cpp
File metadata and controls
38 lines (37 loc) · 704 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#include<iostream>
using namespace std;
int main(){
int n;
cin>>n;
while(n-->0){
int k;
cin>>k;
int o=0;
int e=0;
while(k>0){
int x;
cin>>x;
if(x%2==0){
e++;
}else{
o++;
}
k--;
}
if(o>0&&e>0){
if(o%2==0){
cout<<"YES"<<endl;
}else{
cout<<"NO"<<endl;
}
}else if(o>0){
if(o%2==0){
cout<<"YES"<<endl;
}else{
cout<<"NO"<<endl;
}
}else{
cout<<"YES"<<endl;
}
}
}