-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCodeForces-1296A.cpp
More file actions
42 lines (42 loc) · 849 Bytes
/
CodeForces-1296A.cpp
File metadata and controls
42 lines (42 loc) · 849 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
39
40
41
42
//
// Created by abdob on 10/23/2022.
//
#include <bits/stdc++.h>
#define inf 0x3f3f3f3f
#define ll long long
using namespace std;
const int maxn = 2009;
int a[maxn];
int main()
{
int t;
scanf("%d", &t);
while(t--) {
int n;
scanf("%d", &n);
for(int i = 1;i <= n;++i) {
scanf("%d", &a[i]);
}
int sum1 = 0, sum2 = 0;
for(int i = 1;i <= n;++i) {
if(a[i] & 1) {
sum1++;
}
else {
sum2++;
}
}
if(sum1 & 1) {
printf("YES\n");
}
else {
if(sum2 >= 1 && sum1 >= 1) {
printf("YES\n");
}
else {
printf("NO\n");
}
}
}
return 0;
}