Problem: p03807
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n = int(input())
a = list(map(int, input().split()))
cnt = 0

for i in range(n):
    if a[i]%2 == 1:
        cnt += 1
if cnt%2 == 0:
    print("Yes")
else:
    print("No")

Failing test case input:
3
-2 2 -2

Expected output:
YES


Actual output:
Yes


Fixed submission (verdict: Accepted):
n = int(input())
a = list(map(int, input().split()))
cnt = 0

for i in range(n):
    if a[i]%2 == 1:
        cnt += 1
if cnt%2 == 0:
    print("YES")
else:
    print("NO")

Problem: p03807
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())
A=list(map(int,input().split()))

odd=0
even=0
for item in A:
    if item%2==1:
        odd+=1
    else:
        even+=1

if odd%2==1:
    print("No")
    exit()
else:
    even+=odd
    if even%2==1:
        print("No")
        exit()
        
print("Yes")


Failing test case input:
3
1 0 -2

Expected output:
NO


Actual output:
No


Fixed submission (verdict: Accepted):
N=int(input())
A=list(map(int,input().split()))

if N==1:
    print("YES")
    exit()

odd=0
even=0
for item in A:
    if item%2==1:
        odd+=1
    else:
        even+=1

if odd%2==1:
    print("NO")
    exit()
else:
    even+=odd
        
print("YES")

Problem: p03807
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
A = list(map(int, input().split()))

odd_count = 0
for a in A:
    if a % 2 == 1:
        odd_count += 1

if odd_count % 2 == 0:
    print("Yes")
else:
    print("No")


Failing test case input:
5
0 2 -1 5 2

Expected output:
YES


Actual output:
Yes


Fixed submission (verdict: Accepted):
N = int(input())
A = list(map(int, input().split()))
cnt = 0
for a in A:
    if a%2==1:
        cnt += 1

if cnt%2==0:
    print('YES')
else:
    print('NO')

Problem: p03807
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
f=lambda x:int(x)%2
n=int(input())
a=list(map(f,input().split())).count(1)
print(['YNEOS'][n>1 and a%2>0::2])

Failing test case input:
3
-2 -1 2

Expected output:
NO


Actual output:

Fixed submission (verdict: Accepted):
f=lambda x:int(x)%2
n=int(input())
a=list(map(f,input().split())).count(1)
print('YNEOS'[n>1 and a%2>0::2])

Problem: p03807
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
print(sum([1 if i % 2 == 1 else 0 for i in [int(input()) % 1] + list(map(int, input().split(' ')))]))

Failing test case input:
5
2 1 2 8 2

Expected output:
NO


Actual output:
1


Fixed submission (verdict: Accepted):
print(['YES', 'NO'][sum([1 if i % 2 == 1 else 0 for i in [int(input()) % 1] + list(map(int, input().split(' ')))]) % 2])

Problem: p03807
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
count = [0, 0]
for _ in input().split():
    count[int(_) % 2] += 1
count[1] %= 2
if bool(count[0]) ^ bool(count[1]):
    print('YES')
else:
    print('NO')


Failing test case input:
5
-1 5 -1 5 1

Expected output:
NO


Actual output:
YES


Fixed submission (verdict: Accepted):
N = int(input())
count = [0, 0]
for _ in input().split():
    count[int(_) % 2] += 1
if count[1]:
    count[0] += 1
    count[1] %= 2
if bool(count[0]) ^ bool(count[1]):
    print('YES')
else:
    print('NO')