TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: There are N integers written on a blackboard. The i-th integer is A_i.  Takahashi will repeatedly perform the following operation on these numbers:    * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them.   * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j.  Determine whether it is possible to have only one integer on the blackboard.

Submission attempts (in order):
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]

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])

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])

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])

Verdicts: Runtime Error

Wrong Answer

Runtime Error

Accepted
Problem: There are N integers written on a blackboard. The i-th integer is A_i.  Takahashi will repeatedly perform the following operation on these numbers:    * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them.   * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j.  Determine whether it is possible to have only one integer on the blackboard.

Submission attempts (in order):


n = int(input())
arr = list(map(int, input().split()))
odd = 0
for a in arr:
    if a % 2 == 1:
        odd += 1

print("YES" if odd % 2 == 1 else "NO")




n = int(input())
arr = list(map(int, input().split()))

odd_count = len(list(filter(lambda x : x%2==1, arr)))
if odd_count%2==1:
  print("NO")
else:
  print("YES")

Verdicts: Wrong Answer

Accepted
Problem: There are N integers written on a blackboard. The i-th integer is A_i.  Takahashi will repeatedly perform the following operation on these numbers:    * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them.   * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j.  Determine whether it is possible to have only one integer on the blackboard.

Submission attempts (in order):
N = int(input())
A = list(map(int, input().split()))

cnt = 0 
for x in A:
  if A%2 == 1:
    cnt += 1
    
if cnt % 2 == 0:
  print("YES")
else:
  print("NO")

N = int(input())
A = list(map(int, input().split()))

cnt = 0 
for x in A:
  if x%2 == 1:
    cnt += 1
    
if cnt % 2 == 0:
  print("YES")
else:
  print("NO")

Verdicts: Runtime Error

Accepted
Problem: There are N integers written on a blackboard. The i-th integer is A_i.  Takahashi will repeatedly perform the following operation on these numbers:    * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them.   * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j.  Determine whether it is possible to have only one integer on the blackboard.

Submission attempts (in order):
N = int(input())
numbers = list(map(int, input().split()))

odds = list(filter(lambda x: x % 2 == 0, numbers))
evens = list(filter(lambda x: x % 2 == 1, numbers))

evens_from_odds = sum(divmod(odds, 2))
odds_from_evens = sum(divmod(evens, 2))

if odds_from_evens % 2 == 1 or evens_from_odds % 2 == 1:
    print("YES")
else:
    print("NO")

N = int(input())
numbers = list(map(int, input().split()))







evens = list(filter(lambda x: x % 2 == 1, numbers))
evens_mod = len(evens) % 2

if evens_mod == 1:
    print("NO")
else:
    print("YES")


Verdicts: Runtime Error

Accepted
Problem: There are N integers written on a blackboard. The i-th integer is A_i.  Takahashi will repeatedly perform the following operation on these numbers:    * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them.   * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j.  Determine whether it is possible to have only one integer on the blackboard.

Submission attempts (in order):
n=int(input())
a=list(map(int,input().split()))
odd=0;even=0
for i in range(n):
    if a[i]%2==1:
        odd+=1
    else:
        even+=1
#print(odd,even)
if odd%2==0:
    print('Yes')
else:
    print('No')

n=int(input())
a=list(map(int,input().split()))
odd=0;even=0
for i in range(n):
    if a[i]%2==1:
        odd+=1
    else:
        even+=1
#print(odd,even)
if odd%2==0:
    print('YES')
else:
    print('NO')


Verdicts: Wrong Answer

Accepted
Problem: There are N integers written on a blackboard. The i-th integer is A_i.  Takahashi will repeatedly perform the following operation on these numbers:    * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them.   * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j.  Determine whether it is possible to have only one integer on the blackboard.

Submission attempts (in order):
n = int(input())
a = [int(i) for i in input().split()]

ans = 'Yes'
if sum(a)%2 != 0:
  ans = 'No'
  
print(ans)

n = int(input())
a = [int(i) for i in input().split()]
 
ans = 'YES'
if sum(a)%2 != 0:
  ans = 'NO'
  
print(ans)

Verdicts: Wrong Answer

Accepted
Problem: There are N integers written on a blackboard. The i-th integer is A_i.  Takahashi will repeatedly perform the following operation on these numbers:    * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them.   * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j.  Determine whether it is possible to have only one integer on the blackboard.

Submission attempts (in order):
#
# agc010 a
#

import sys
from io import StringIO
import unittest


class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)

    def test_入力例_1(self):
        input = """3
1 2 3"""
        output = """YES"""
        self.assertIO(input, output)

    def test_入力例_2(self):
        input = """5
1 2 3 4 5"""
        output = """NO"""
        self.assertIO(input, output)


def resolve():
    N = int(input())
    A = list(map(int, input().split()))

    e = 0
    o = 0
    for a in A:
        if a % 2 == 0:
            e += 1
        else:
            o += 1

    if o % 2 == 0:
        if (o // 2 + e) % 2 == 0:
        print("YES")
    else:
        print("NO")


if __name__ == "__main__":
    # unittest.main()
    resolve()


#
# agc010 a
#

import sys
from io import StringIO
import unittest


class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)

    def test_入力例_1(self):
        input = """3
1 2 3"""
        output = """YES"""
        self.assertIO(input, output)

    def test_入力例_2(self):
        input = """5
1 2 3 4 5"""
        output = """NO"""
        self.assertIO(input, output)


def resolve():
    N = int(input())
    A = list(map(int, input().split()))

    e = 0
    o = 0
    for a in A:
        if a % 2 == 0:
            e += 1
        else:
            o += 1

    if o % 2 == 0:
        print("YES")
    else:
        print("NO")


if __name__ == "__main__":
    # unittest.main()
    resolve()


Verdicts: Runtime Error

Accepted
Problem: There are N integers written on a blackboard. The i-th integer is A_i.  Takahashi will repeatedly perform the following operation on these numbers:    * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them.   * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j.  Determine whether it is possible to have only one integer on the blackboard.

Submission attempts (in order):
N = input()
A = input().split()
count=0
for i in range(N):
  if A[i]%2==1:
    count+=1
if conut%2=1:
  print("NO")
else:
  print("YES")

N = input()
A = input().split()
count=0
for i in range(int(N)):
  if int(A[i]) % 2==1:
    count+=1
if count%2==1:
  print("NO")
else:
  print("YES")



Verdicts: Runtime Error

Accepted
Problem: There are N integers written on a blackboard. The i-th integer is A_i.  Takahashi will repeatedly perform the following operation on these numbers:    * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them.   * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j.  Determine whether it is possible to have only one integer on the blackboard.

Submission attempts (in order):
N = int(input())
A = [int(j) for j in input().split()]

if sum(A)==0:
    print('YES')
else:
    print('NO')

N = int(input())
A = [int(j) for j in input().split()]

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

Verdicts: Wrong Answer

Accepted
Problem: There are N integers written on a blackboard. The i-th integer is A_i.  Takahashi will repeatedly perform the following operation on these numbers:    * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them.   * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j.  Determine whether it is possible to have only one integer on the blackboard.

Submission attempts (in order):
N = int(input())
*A, = map(int, input().split())

count = 0

for i in range(len(A)):
    if A[i]%2!=0:
        count = count + 1

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

N = int(input())
*A, = map(int, input().split())

count = 0

for i in range(len(A)):
    if A[i]%2!=0:
        count = count + 1

if count%2==0:
    print("YES")
else:
    print("NO")

Verdicts: Wrong Answer

Accepted
Problem: There are N integers written on a blackboard. The i-th integer is A_i.  Takahashi will repeatedly perform the following operation on these numbers:    * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them.   * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j.  Determine whether it is possible to have only one integer on the blackboard.

Submission attempts (in order):
n = input()
s = list(map(int,input().split()))
c = 0
for i in s:
  if s % 2 == 1:
    c+=1
if c % 2 == 1:
  print("NO")
else:
  print("YES")

n = input()
s = list(map(int,input().split()))
c = 0
for i in s:
    if s % 2 == 1:
        c+=1
if c % 2 == 1:
    print("NO")
else:
    print("YES")

n = input()
s = list(map(int,input().split()))
c = 0
for i in s:
    if i % 2 == 1:
        c+=1
if c % 2 == 1:
    print("NO")
else:
    print("YES")

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: There are N integers written on a blackboard. The i-th integer is A_i.  Takahashi will repeatedly perform the following operation on these numbers:    * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them.   * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j.  Determine whether it is possible to have only one integer on the blackboard.

Submission attempts (in order):
N = int(input())
A = list(map(int, input().split()))

odd = 0
even = 0

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

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


N = int(input())
A = list(map(int, input().split()))

odd = 0
even = 0

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

if odd % 2 == 0:
    print("YES")
else:
    print("NO")


Verdicts: Wrong Answer

Accepted
Problem: There are N integers written on a blackboard. The i-th integer is A_i.  Takahashi will repeatedly perform the following operation on these numbers:    * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them.   * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j.  Determine whether it is possible to have only one integer on the blackboard.

Submission attempts (in order):
n=input()
a=list(map(int,input().split()))
res=0
odd=0
even=0
for x in a:
    if x%2==0:
        even+=1
    else:
        odd+=1
res+=odd%2
even+=odd//2
res+=even%2
if res%2==1:
    print("YES")
else:
    print("NO")


n=input()
a=list(map(int,input().split()))
res=0
odd=0
even=0
for x in a:
    if x%2==0:
        even+=1
    else:
        odd+=1
res+=odd%2
if res==1:
    print("NO")
else:
    print("YES")


Verdicts: Wrong Answer

Accepted
Problem: There are N integers written on a blackboard. The i-th integer is A_i.  Takahashi will repeatedly perform the following operation on these numbers:    * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them.   * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j.  Determine whether it is possible to have only one integer on the blackboard.

Submission attempts (in order):
n=int(input())
l=list(map(int,input().split()))
ans1=0
ans2=0
for i in range(len(l)):
    if l[i]%2==0:
        ans2+=1
    if l[i]%2==1:
        ans1+=1
if  ans1%2==0:
    print('NO')
else:
    print('YES')

n=int(input())
l=list(map(int,input().split()))
ans1=0
ans2=0
for i in range(len(l)):
    if l[i]%2==0:
        ans2+=1
    if l[i]%2==1:
        ans1+=1
if  ans1%2==1 and ans2%2==0 or ans2%2==1:
    print('NO')
else:
    print('YES')

n=int(input())
l=list(map(int,input().split()))
ans1=0
ans2=0
for i in range(len(l)):
    if l[i]%2==0:
        ans2+=1
    if l[i]%2==1:
        ans1+=1
if  ans1%2==1 and ans2%2==0 or ans2%2!=0 and ans1!=0:
    print('NO')
else:
    print('YES')

n=int(input())
l=list(map(int,input().split()))
ans1=0
ans2=0
for i in range(len(l)):
    if l[i]%2==0:
        ans2+=1
    if l[i]%2==1:
        ans1+=1
if  ans1%2==0:
    print('YES')
else:
    print('NO')

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: There are N integers written on a blackboard. The i-th integer is A_i.  Takahashi will repeatedly perform the following operation on these numbers:    * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them.   * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j.  Determine whether it is possible to have only one integer on the blackboard.

Submission attempts (in order):
N = int(input())

A = list(map(int,input().split()))

if len(list(filter(lambda x:x%2==1,A)))%2==1:
    print("No")
else:
    print("Yes")

N = int(input())

A = list(map(int,input().split()))

if len(list(filter(lambda x:x%2==1,A)))%2==1:
    print("NO")
else:
    print("YES")

Verdicts: Wrong Answer

Accepted
Problem: There are N integers written on a blackboard. The i-th integer is A_i.  Takahashi will repeatedly perform the following operation on these numbers:    * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them.   * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j.  Determine whether it is possible to have only one integer on the blackboard.

Submission attempts (in order):
N=int(input())
L=list(map(int,input().split()))
count=0
for i in range N:
	if L[i]%2==1:
		count+=1
if count%2==1:
	print("NO")
else:
	print("YES")

N=int(input())
L=list(map(int,input().split()))
C=0
for i in range(N):
	if L[i]%2==1:
		C+=1
if C%2==1:
	print("NO")
else:
	print("YES")

Verdicts: Runtime Error

Accepted
Problem: There are N integers written on a blackboard. The i-th integer is A_i.  Takahashi will repeatedly perform the following operation on these numbers:    * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them.   * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j.  Determine whether it is possible to have only one integer on the blackboard.

Submission attempts (in order):
input()
a = list(map(int, input().split()))
if 1 & len([i for i in a if i&1]):
    print('No')
else:
    print('Yes')


input()
a = list(map(int, input().split()))
if 1 & len([i for i in a if i&1]):
    print('NO')
else:
    print('YES')


Verdicts: Wrong Answer

Accepted
Problem: There are N integers written on a blackboard. The i-th integer is A_i.  Takahashi will repeatedly perform the following operation on these numbers:    * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them.   * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j.  Determine whether it is possible to have only one integer on the blackboard.

Submission attempts (in order):
n=int(input())
a=list(map(int,input().split()))
s=0
for i in range(n):
  s+=1 if a[i]%2==1
print('YES' if s%2==0 else 'NO')

n=int(input())
a=list(map(int,input().split()))
s=0
for i in range(n):
  if a[i]%2==1:
    s+=1
print('YES' if s%2==0 else 'NO')

Verdicts: Runtime Error

Accepted
Problem: There are N integers written on a blackboard. The i-th integer is A_i.  Takahashi will repeatedly perform the following operation on these numbers:    * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them.   * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j.  Determine whether it is possible to have only one integer on the blackboard.

Submission attempts (in order):
# -*- coding: utf-8 -*-

N = int(input())
A = list(map(int, input().split()))

even = odd = 0
for i in range(N):
    if A[i] % 2 == 0:
        even += 1
    else:
        odd += 1

if odd % 2 != 0:
    print("No")
    exit()
else:
    even += int(odd / 2)

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



# -*- coding: utf-8 -*-

N = int(input())
A = list(map(int, input().split()))

even = odd = 0
for i in range(N):
    if A[i] % 2 == 0:
        even += 1
    else:
        odd += 1

if odd % 2 != 0:
    print("NO")
else:
    print("YES")


Verdicts: Wrong Answer

Accepted
Problem: There are N integers written on a blackboard. The i-th integer is A_i.  Takahashi will repeatedly perform the following operation on these numbers:    * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them.   * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j.  Determine whether it is possible to have only one integer on the blackboard.

Submission attempts (in order):
_, *a = map(int, open(0).read().split())
odd = sum(not ai % 2 for ai in a) + 1
print('YNeos'[odd % 2::2])

_, *a = map(int, open(0).read().split())
odd = sum(not ai % 2 for ai in a) + 1
print('YNeos'[odd % 2::2])

_, *a = map(int, open(0).read().split())
odd = sum(ai % 2 for ai in a)
print('YNEOS'[odd % 2::2])

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: There are N integers written on a blackboard. The i-th integer is A_i.  Takahashi will repeatedly perform the following operation on these numbers:    * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them.   * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j.  Determine whether it is possible to have only one integer on the blackboard.

Submission attempts (in order):
N = input()
if len([a for a in input().rstrip().split() if a % 2]) % 2:
    print('NO')
else:
    print('YES')

N = input()
if len([a for a in input().rstrip().split() if int(a) % 2]) % 2:
    print('NO')
else:
    print('YES')

Verdicts: Runtime Error

Accepted
Problem: There are N integers written on a blackboard. The i-th integer is A_i.  Takahashi will repeatedly perform the following operation on these numbers:    * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them.   * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j.  Determine whether it is possible to have only one integer on the blackboard.

Submission attempts (in order):
length = int(input())
target = [int(n) for n in input().split(" ")]
even,odd = 0,0
for l in range(length):
    if target[l] % 2 == 0:
        even += 1
    else:
        odd += 1
if even % 2 == 0:
    print("YES")
else:
    print("NO")

length = int(input())
target = [int(n) for n in input().split(" ")]
even,odd = 0,0
for l in range(length):
    if target[l] % 2 == 0:
        even += 1
    else:
        odd += 1
if odd % 2 == 0:
    print("YES")
else:
    print("NO")

Verdicts: Wrong Answer

Accepted
Problem: There are N integers written on a blackboard. The i-th integer is A_i.  Takahashi will repeatedly perform the following operation on these numbers:    * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them.   * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j.  Determine whether it is possible to have only one integer on the blackboard.

Submission attempts (in order):
n = int(input())
a = list(map(int, input().split()))
a.sort()
cnt = 0
for i in range(n):
    if a[i]%2:
        cnt += 1
if cnt%2:
    print("No")
else:
    print("Yes")

n = int(input())
a = list(map(int, input().split()))
cnt = 0
for i in range(n):
    if a[i]%2:
        cnt += 1
if cnt%2:
    print("No")
else:
    print("Yes")

n = int(input())

if sum(map(int, input().split()))%2:
    print("No")
else:
    print("Yes")

n = int(input())

if sum(map(int, input().split()))%2:
    print("NO")
else:
    print("YES")

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: There are N integers written on a blackboard. The i-th integer is A_i.  Takahashi will repeatedly perform the following operation on these numbers:    * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them.   * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j.  Determine whether it is possible to have only one integer on the blackboard.

Submission attempts (in order):
n = input()
a_list = [int(i) for i in input().split()]

add_or_not = [True if i%2==1 else False for i in a_list]
if sum(add_or_not) %2 == 1:
  print('YES')
else:
  print('NO')

n = input()
a_list = [int(i) for i in input().split()]

add_or_not = [True if i%2==1 else False for i in a_list]
if sum(add_or_not) %2 == 1:
  print('NO')
else:
  print('YES')

Verdicts: Wrong Answer

Accepted
Problem: There are N integers written on a blackboard. The i-th integer is A_i.  Takahashi will repeatedly perform the following operation on these numbers:    * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them.   * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j.  Determine whether it is possible to have only one integer on the blackboard.

Submission attempts (in order):
a=int(input())
li = list(map(int,input().split()))

lis = []
for name in li:
    if name % 2 == 1:
        lis.append(name)
        
if len(lis)%2==0:
    print("Yes")
else:
    print("No")

a=int(input())
li = list(map(int,input().split()))

lis = []
for name in li:
    if name % 2 == 1:
        lis.append(name)
        
if len(lis)%2==0:
    print("YES")
else:
    print("NO")

Verdicts: Wrong Answer

Accepted
Problem: There are N integers written on a blackboard. The i-th integer is A_i.  Takahashi will repeatedly perform the following operation on these numbers:    * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them.   * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j.  Determine whether it is possible to have only one integer on the blackboard.

Submission attempts (in order):
N = int(input())
A = list(map(int,input().split()))
if sum(A) % 2 == 0:
  print("Yes")
else:
  print("No")

N = int(input())
A = list(map(int,input().split()))

while len(A) > 3:
  i = 1
  cand = [x for x in A[1:] if A[0] % 2 == x % 2]
  if len(A) > 1 and len(cand) >0:
    num = A[0] + cand[0]
    A.pop(0)
    A.remove(cand[0])
    A.append(num)

A = list(map(lambda x: x % 2, A))
print(A)
if sum(A) % 2 == 0:
  print("Yes")
else:
  print("No")

N = int(input())
A = list(map(int,input().split()))

while len(A) > 3:
  i = 1
  cand = [x for x in A[1:] if A[0] % 2 == x % 2]
  if len(A) > 1 and len(cand) >0:
    num = A[0] + cand[0]
    A.pop(0)
    A.remove(cand[0])
    A.append(num)

A = list(map(lambda x: x % 2, A))
if sum(A) % 2 == 0:
  print("Yes")
else:
  print("No")

N = int(input())
A = list(map(int,input().split()))
if sum(A) % 2 == 0:
  print("YES")
else:
  print("NO")

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: There are N integers written on a blackboard. The i-th integer is A_i.  Takahashi will repeatedly perform the following operation on these numbers:    * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them.   * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j.  Determine whether it is possible to have only one integer on the blackboard.

Submission attempts (in order):
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==1:
    print("NO")
else:
    print("Yes")

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==1:
    print("NO")
else:
    print("Yes")

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==1:
    print("NO")
else:
    print("YES")

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: There are N integers written on a blackboard. The i-th integer is A_i.  Takahashi will repeatedly perform the following operation on these numbers:    * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them.   * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j.  Determine whether it is possible to have only one integer on the blackboard.

Submission attempts (in order):
n=int(input())
odd=0
even=0
a=list(map(int,input().split()))
for i in range(n):
  if a[i]%2=1:
    odd+=1
  else:
    even+=1
if odd%2==1:
  print("NO")
else:
  print("YES")

n=int(input())
odd=0
even=0
a=list(map(int,input().split()))
for i in range(n):
  if a[i]%2==1:
    odd+=1
  else:
    even+=1
if odd%2==1:
  print("NO")
else:
  print("YES")


Verdicts: Runtime Error

Accepted
Problem: There are N integers written on a blackboard. The i-th integer is A_i.  Takahashi will repeatedly perform the following operation on these numbers:    * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them.   * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j.  Determine whether it is possible to have only one integer on the blackboard.

Submission attempts (in order):
n=int(input())
a=sum([int(i) for i in input().split()]

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

n=int(input())
a=sum([int(i) for i in input().split()])

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

Verdicts: Runtime Error

Accepted
Problem: There are N integers written on a blackboard. The i-th integer is A_i.  Takahashi will repeatedly perform the following operation on these numbers:    * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them.   * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j.  Determine whether it is possible to have only one integer on the blackboard.

Submission attempts (in order):
5
1 2 3 4 5

n = int(input())
line = map(int,input().split())
odd = []
for i in line:
  if i % 2 == 1:
    odd.append(i)
if len(odd) % 2 == 0:
  print("YES")
else:
  print("NO")

Verdicts: Runtime Error

Accepted
Problem: There are N integers written on a blackboard. The i-th integer is A_i.  Takahashi will repeatedly perform the following operation on these numbers:    * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them.   * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j.  Determine whether it is possible to have only one integer on the blackboard.

Submission attempts (in order):
N=int(input())
A=list(map(int,input().split())
kazu = len([x for x in A if x%2 == 1])
if kazu%2==1:
  print('NO')
else:
  print('YES')

N=int(input())
A=list(map(int,input().split()))
kazu = len([x for x in A if x%2 == 1])
if kazu%2==1:
  print('NO')
else:
  print('YES')

Verdicts: Runtime Error

Accepted
Problem: There are N integers written on a blackboard. The i-th integer is A_i.  Takahashi will repeatedly perform the following operation on these numbers:    * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them.   * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j.  Determine whether it is possible to have only one integer on the blackboard.

Submission attempts (in order):
n = int(input())
a = list(map(int,input().split()))
odd = len([i for i in a if i%2==1])
if odd%2 != 0:
    print('No')
else:
    print('Yes')


n = int(input())
a = list(map(int,input().split()))
odd = len([i for i in a if i%2==1])
if odd%2 != 0:
    print('NO')
else:
    print('YES')


Verdicts: Wrong Answer

Accepted
Problem: There are N integers written on a blackboard. The i-th integer is A_i.  Takahashi will repeatedly perform the following operation on these numbers:    * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them.   * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j.  Determine whether it is possible to have only one integer on the blackboard.

Submission attempts (in order):
s = list(map(int,input().split()))
count = 0
for i in s:
  if i % 2 == 1:
    count += 1
  else:
    continue

if count % 2 == 1:
  print("NO")
else:
  print("YES")

n = int(input())
s = list(map(int,input().split()))
count = 0
for i in s:
  if i % 2 == 1:
    count += 1
  else:
    continue

if count % 2 == 1:
  print("NO")
else:
  print("YES")

Verdicts: Wrong Answer

Accepted
Problem: There are N integers written on a blackboard. The i-th integer is A_i.  Takahashi will repeatedly perform the following operation on these numbers:    * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them.   * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j.  Determine whether it is possible to have only one integer on the blackboard.

Submission attempts (in order):
# -*- coding: utf-8 -*-

n = int(input())
a = list(map(int, input().split()))

print('Yes' if len([i for i in a if i%2==1])%2==0 else 'No')

# -*- coding: utf-8 -*-

n = int(input())
a = list(map(int, input().split()))

print('YES' if len([i for i in a if i%2==1])%2==0 else 'NO')

Verdicts: Wrong Answer

Accepted
Problem: There are N integers written on a blackboard. The i-th integer is A_i.  Takahashi will repeatedly perform the following operation on these numbers:    * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them.   * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j.  Determine whether it is possible to have only one integer on the blackboard.

Submission attempts (in order):
N=int(input())
A=[int(i) for i in input().split()]

count=0
for i in A:
	if i%2==1:
		count+=1
if count%2==0:
	print("YES")
else:
	print("NO)

N=int(input())
A=[int(i) for i in input().split()]

count=0
for i in A:
	if i%2==1:
		count+=1
if count%2==0:
	print("YES")
else:
	print("NO")

Verdicts: Runtime Error

Accepted
Problem: There are N integers written on a blackboard. The i-th integer is A_i.  Takahashi will repeatedly perform the following operation on these numbers:    * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them.   * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j.  Determine whether it is possible to have only one integer on the blackboard.

Submission attempts (in order):
N = int(input())
A = list(map(int, input().split()))

odds = []
evens = []
for a in A:
    if a%2 == 0:
        evens.append(a)
    else:
        odds.append(a)

num_evens = len(evens)
num_odds = len(odds)

if num_odds%2 == 0:
    num_evens += num_odds/2
    num_odds = 0
    print('Yes')
else:
    num_evens += (num_odds-1)/2
    num_odds = 1
    print('No')




N = int(input())
A = list(map(int, input().split()))

odds = []
evens = []
for a in A:
    if a%2 == 0:
        evens.append(a)
    else:
        odds.append(a)

num_evens = len(evens)
num_odds = len(odds)

if num_odds%2 == 0:
    num_evens += num_odds/2
    num_odds = 0
    print('YES')
else:
    num_evens += (num_odds-1)/2
    num_odds = 1
    print('NO')




Verdicts: Wrong Answer

Accepted
Problem: There are N integers written on a blackboard. The i-th integer is A_i.  Takahashi will repeatedly perform the following operation on these numbers:    * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them.   * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j.  Determine whether it is possible to have only one integer on the blackboard.

Submission attempts (in order):
N = input()
A = list(map(int, input()))
s = sum(A)
if s%2==0:
  print("YES")
else:
  print("NO")

N = input()
A = list(map(int, input().split()))
s = sum(A)
if s%2==0:
  print("YES")
else:
  print("NO")

Verdicts: Runtime Error

Accepted
Problem: There are N integers written on a blackboard. The i-th integer is A_i.  Takahashi will repeatedly perform the following operation on these numbers:    * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them.   * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j.  Determine whether it is possible to have only one integer on the blackboard.

Submission attempts (in order):
a = int(input())
b = input().split()
x = []
for i in b:
    x.append(int(i))

count = 0

for i in x:
    if i % 2 != 0:
        count += 1

flag = 0
while True:
    z = divmod(count,2)

    #print(z)

    if z[0] == 1:
        break

    if z[1] == 1:
        flag = 1
        break

    count = z[0]

if flag == 1:
    print("NO")
else:
    print("YES")a = int(input())
b = input().split()
x = []
for i in b:
    x.append(int(i))

count = 0

for i in x:
    if i % 2 != 0:
        count += 1

flag = 0
while True:
    z = divmod(count,2)

    #print(z)

    if z[0] == 1:
        break

    if z[1] == 1:
        flag = 1
        break

    count = z[0]

if flag == 1:
    print("NO")
else:
    print("YES")

a = int(input())
b = input().split()
x = []
for i in b:
    x.append(int(i))

count = 0

for i in x:
    if i % 3 == 0:
        count += 1

if count % 2 == 0:
    print("YES")
else:
    print("NO")  


a = int(input())
b = input().split()
x = []
for i in b:
    x.append(int(i))

count = 0

for i in x:
    if i % 2 != 0:
        count += 1


z = count % 2

if z == 1:
    print("NO")
else:
    print("YES")


Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: There are N integers written on a blackboard. The i-th integer is A_i.  Takahashi will repeatedly perform the following operation on these numbers:    * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them.   * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j.  Determine whether it is possible to have only one integer on the blackboard.

Submission attempts (in order):
n=int(input())
a=list(map(int.input().split()))
c=0
for i in range(n):
    if a[i]%2!=0:
        c+=1
if c%2==0:
    print('YES')
else:
    print('NO')

n=int(input())
a=list(map(int,input().split()))
c=0
for i in range(n):
    if a[i]%2!=0:
        c+=1
if c%2==0:
    print('YES')
else:
    print('NO')

Verdicts: Runtime Error

Accepted
Problem: There are N integers written on a blackboard. The i-th integer is A_i.  Takahashi will repeatedly perform the following operation on these numbers:    * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them.   * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j.  Determine whether it is possible to have only one integer on the blackboard.

Submission attempts (in order):
input();print('YNeos'[sum(int(i)%2for i in input().split())%2::2])

n,a=open(0);print('YNEOS'[sum(map(int,a.split()))%2::2])

Verdicts: Wrong Answer

Accepted
Problem: There are N integers written on a blackboard. The i-th integer is A_i.  Takahashi will repeatedly perform the following operation on these numbers:    * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them.   * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j.  Determine whether it is possible to have only one integer on the blackboard.

Submission attempts (in order):
# AGC 010 A - Addition
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')

# AGC 010 A - Addition
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')

Verdicts: Wrong Answer

Accepted
Problem: There are N integers written on a blackboard. The i-th integer is A_i.  Takahashi will repeatedly perform the following operation on these numbers:    * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them.   * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j.  Determine whether it is possible to have only one integer on the blackboard.

Submission attempts (in order):
N = int(input())
nums = list(map(int, input().split()))

evens = [nums[i] for i in range(N) if nums[i] % 2 == 0]
odds  = [nums[i] for i in range(N) if nums[i] % 2 != 0]

if 2 * len(evens) == len(odds):
    print('Yes')
else:
    print('No')

N = int(input())
nums = list(map(int, input().split()))

evens = [nums[i] for i in range(N) if nums[i] % 2 == 0]
odds  = [nums[i] for i in range(N) if nums[i] % 2 != 0]

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

Verdicts: Wrong Answer

Accepted
Problem: There are N integers written on a blackboard. The i-th integer is A_i.  Takahashi will repeatedly perform the following operation on these numbers:    * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them.   * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j.  Determine whether it is possible to have only one integer on the blackboard.

Submission attempts (in order):
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 == 1:
    print('No')
else:
    print('Yes')

n = int(input())
a = list(map(int, input().split()))
if sum([1 for b in a if b%2 == 1]) % 2 == 1:
    print('NO')
else:
    print('YES')

Verdicts: Wrong Answer

Accepted
Problem: There are N integers written on a blackboard. The i-th integer is A_i.  Takahashi will repeatedly perform the following operation on these numbers:    * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them.   * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j.  Determine whether it is possible to have only one integer on the blackboard.

Submission attempts (in order):
n = int(input())
*a, = map(int, input().split())
print("No" if len(list(filter(lambda x: x%2, a)))%2 else "Yes")


n = int(input())
*a, = map(int, input().split())
print("NO" if len(list(filter(lambda x: x%2, a)))%2 else "YES")

Verdicts: Wrong Answer

Accepted
Problem: There are N integers written on a blackboard. The i-th integer is A_i.  Takahashi will repeatedly perform the following operation on these numbers:    * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them.   * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j.  Determine whether it is possible to have only one integer on the blackboard.

Submission attempts (in order):
[NO][YES]?k2?K[1-d0<G+]dsGx0k3|Rp

n = int(input())
A = list(map(int, input().split()))
c = 0
for i in A:
  if i%2:
    c += 1
if c%2==0:
  print("YES")
else:
  print("NO")

Verdicts: Runtime Error

Accepted
Problem: There are N integers written on a blackboard. The i-th integer is A_i.  Takahashi will repeatedly perform the following operation on these numbers:    * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them.   * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j.  Determine whether it is possible to have only one integer on the blackboard.

Submission attempts (in order):
N = int(input())
A = [int(i) for i in input().split()]

odd = 0
for a in A:
  if a % 2 ==1:
    odd += 1
    
    
    
if odd % 2== 0:
  print("Yes")
else:
  print("No")
  

N  = int(input())
A = [int(i) for i in input().split()]

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

if odd % 2 == 0:
    print("YES")
else:
    print("NO")


Verdicts: Wrong Answer

Accepted
Problem: There are N integers written on a blackboard. The i-th integer is A_i.  Takahashi will repeatedly perform the following operation on these numbers:    * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them.   * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j.  Determine whether it is possible to have only one integer on the blackboard.

Submission attempts (in order):
N = input().split()
K = int(N[0])
NN = input().split()
even = [int(n) for n in NN if int(n) % 2 == 0]
odd = [int(n) for n in NN if int(n) % 2 != 0]
if K % 2 == 0:
    print("YES")
else:
    if len(even) < len(odd):
        print("NO")
    else:
        print("YES")

N = input().split()
K = int(N[0])
NN = input().split()
odd = [n for n in [int(N) for N in NN] if n % 2 != 0]

if len(odd) % 2 != 0:
    print("NO")
else:
    print("YES")


Verdicts: Wrong Answer

Accepted
Problem: There are N integers written on a blackboard. The i-th integer is A_i.  Takahashi will repeatedly perform the following operation on these numbers:    * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them.   * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j.  Determine whether it is possible to have only one integer on the blackboard.

Submission attempts (in order):
N = int(input())
A = list(map(int,input().split()))

odds = len([a for a in A if a % 2 == 1])

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

N = int(input())
A = list(map(int,input().split()))


odds = len([a for a in A if a % 2 == 1])

if odds % 2 == 0:
  print("YES")
else:
  print("NO")

Verdicts: Wrong Answer

Accepted
Problem: There are N integers written on a blackboard. The i-th integer is A_i.  Takahashi will repeatedly perform the following operation on these numbers:    * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them.   * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j.  Determine whether it is possible to have only one integer on the blackboard.

Submission attempts (in order):
N = int(input())
A = list(map(int, input().split()))
s = 0
for i in range(N):
    if A[i] % 2 == 1:
        s += 1
if s % 2 == 0:
    print('Yes')
else:
    print('No')

N = int(input())
A = list(map(int, input().split()))
s = 0
for i in range(N):
    if A[i] % 2 == 1:
        s += 1
if s % 2 == 0:
    print('YES')
else:
    print('NO')

Verdicts: Wrong Answer

Accepted
Problem: There are N integers written on a blackboard. The i-th integer is A_i.  Takahashi will repeatedly perform the following operation on these numbers:    * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them.   * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j.  Determine whether it is possible to have only one integer on the blackboard.

Submission attempts (in order):
n=int(input())
hoge=list(map(int,input().split()))
ans=0
for i in range(n):
  ans+=hoge[i]%2
if(ans%2):
  print("YES")
else:
  print("NO")

n=int(input())
hoge=list(map(int,input().split()))
ans=0
for i in range(n):
  ans+=hoge[i]%2
if(ans%2):
  print("NO")
else:
  print("YES")

Verdicts: Wrong Answer

Accepted
Problem: There are N integers written on a blackboard. The i-th integer is A_i.  Takahashi will repeatedly perform the following operation on these numbers:    * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them.   * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j.  Determine whether it is possible to have only one integer on the blackboard.

Submission attempts (in order):
N = int(input())
A = map(int,input().split())

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

N = int(input())
A = map(int,input().split())
O = 0
E = 0

for i in A:
    if i % 2 == 1:
        O += 1
    else:
        E += 1
if O % 2 == 0:
    print("Yes")
else:
    print("No")

N = int(input())
A = map(int,input().split())

if sum(A) % 2 == 0:
    print("YES")
else:
    print("NO")

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: There are N integers written on a blackboard. The i-th integer is A_i.  Takahashi will repeatedly perform the following operation on these numbers:    * Select a pair of integers, A_i and A_j, that have the same parity (that is, both are even or both are odd) and erase them.   * Then, write a new integer on the blackboard that is equal to the sum of those integers, A_i+A_j.  Determine whether it is possible to have only one integer on the blackboard.

Submission attempts (in order):
a = int(input())
x= list(map(int, input().split()))

for i in x:
    if i%2!=0:
        s+=1
if s%2==0:
    print("YES")
else:print("NO")

a = int(input())
x= list(map(int, input().split()))
s=0
for i in x:
    if i%2!=0:
        s+=1
if s%2==0:
    print("YES")
else:print("NO")

Verdicts: Runtime Error

Accepted