Problem p03637 (python)

Fixed submission:
N = int(input())
a = list(map(int,input().split()))
one = 0
four = 0
two = 0

for j in range(N):

  if a[j]%2 == 1:
    one += 1
  elif a[j]%4 == 0:
    four += 1
  else :
    two +=1

print("Yes" if four >= one or (four == one - 1 and two == 0) else "No")

Buggy submission (verdict: Runtime Error):
N = int(input())
a = list(map(int,input().split()))
one = 0
four = 0
two = 0

for j in range(N):

  if a[j]%2 == 1:
    one += 1
  elif a[j]%4 == 0:
    four += 1
  else :
    two +=1

  
if one =< four or (two == 0 and four == one-1):
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
N = int(input())
a = list(map(int,input().split()))
one = 0
four = 0
two = 0

for j in range(N):

  if a[j]%2 == 1:
    one += 1
  elif a[j]%4 == 0:
    four += 1
  else :
    two +=1

  
if one =< four:
  print('Yes')
else :
  if two == 0 and four == one -1:
     print('Yes')
  else:
     print('No')

Buggy submission (verdict: Runtime Error):
N = int(input())
a = list(map(int,input().split()))
one = 0
four = 0
two = 0

for j in range(N):

  if a[j]%2 == 1:
    one += 1
  elif a[j]%4 == 0:
    four += 1
  else :
    two +=1

  
if one =< four:
  print('Yes')
else :
  if (two == 0 and four == one -1):
     print('Yes')
  else:
    print('No')

Buggy submission (verdict: Runtime Error):
N = int(input())
a = list(map(int,input().split()))
one = 0
four = 0
two = 0

for j in range(N):

  if a[j]%2 == 1:
    one += 1
  elif a[j]%4 == 0:
    four += 1
  else :
    two +=1

  
if one =< four:
  print('Yes')
else :
  if two == 0 and four == one -1:
     print('Yes')
  else:
    print('No')

Buggy submission (verdict: Runtime Error):
N = int(input())
a = list(map(int,input().split()))
one = 0
four = 0
two = 0

for j in range(N):

  if a[j]%2 == 1:
    one += 1
  elif a[j]%4 == 0:
    four += 1
  else :
    two +=1

  
if one =< four:
  print('Yes')
else :
  if two == 0:
    if four == one-1:
      print('Yes')
    else:
      print('No')
  else:
    print('No')

Buggy submission (verdict: Runtime Error):
N = int(input())
a = list(map(int,input().split()))
one = 0
four = 0
two = 0

for j in range(N):

  if a[j]%2 == 1:
    one += 1
  elif a[j]%4 == 0:
    four += 1
  else :
    two +=1

  
if one =< four:
  print('Yes')
else :
  if two == 0:
    if four == one-1:
      print('Yes')
    else:
      print("No")
  else:
    print('No')

Buggy submission (verdict: Runtime Error):
N = int(input())
a = list(map(int,input().split()))
one = 0
four = 0
two = 0

for j in range(N):

  if a[j]%2 == 1:
    one += 1
  elif a[j]%4 == 0:
    four += 1
  else :
    two +=1

  
if one =< four:
  print('Yes')
else :
  if two == 0:
    if four == one-1:
      print('Yes')
  else:
    print('No')

Buggy submission (verdict: Runtime Error):
N = int(input())
a = list(map(int,input().split()))
one = 0
four = 0
two = 0
     
for j in range(N):
     
  if a[j]%2 == 1:
	one += 1
  elif a[j]%4 == 0:
	four += 1
  else :
	two +=1
     
      
if one <= four:
	print('Yes')
else :
	if two == 0:
          if four >= (one+1):
	    print('Yes')
        else:
	  print('No')

Buggy submission (verdict: Runtime Error):
N = int(input())
a = list(map(int,input().split()))
one = 0
four = 0
two = 0
     
for j in range(N):
     
  if a[j]%2 == 1:
	one += 1
  elif a[j]%4 == 0:
	four += 1
  else :
	two +=1
     
      
if one <= four:
	print('Yes')
else :
	if two == 0:
if four >= (one+1):
	print('Yes')
else:
	print('No')

Buggy submission (verdict: Runtime Error):
N = int(input())
a = list(map(int,input().split()))
one = 0
four = 0
two = 0
     
for j in range(N):
     
if a[j]%2 == 1:
	one += 1
elif a[j]%4 == 0:
	four += 1
else :
	two +=1
     
      
if one <= four:
	print('Yes')
else :
	if two == 0:
if four >= (one+1):
	print('Yes')
else:
	print('No')

Buggy submission (verdict: Runtime Error):
N = int(input())
a = list(map(int,input().split()))
Kisuu = 0
YonBaisuu = 0
NiBaisuu = 0

for j in range(N):

  if a[j]%2 == 1:
    Kisuu += 1
  elif a[j]%4 == 0:
    YonBaisuu += 1
  else :
    NiBaisuu +=1

  
if Kisuu <= YonBaisuu:
  print('Yes')
else :
  if NiBaisuu == 0:
      if Kissuu+1 == YonBaisuu:
        print('Yes')
  else:
    print('No')

Buggy submission (verdict: Runtime Error):
N = int(input())
a = list(map(int,input().split()))
Kisuu = 0
YonBaisuu = 0
NiBaisuu = 0

for j in range(N):
  print(j)
  if a[j]%2 == 1:
    Kisuu += 1
  elif a[j]%4 == 0:
    YonBaisuu += 1
  else :
    NiBaisuu +=1

  
if Kisuu <= YonBaisuu:
  print('Yes')
else :
  if NIBaisuu == 0:
    print('Yes')
  else:
    print('No')

print(Kisuu)
print(NiBaisuu)
print(YonBaisuu)

Buggy submission (verdict: Runtime Error):
N = int(input())
a=[int(x) for x in input().split()]
Kisuu = 0
YonBaisuu = 0
NiBaisuu = 0

for j in range(N):
  if a[j]%2 == 1:
    Kisuu += 1
  elif a[j]%4 == 0:
    YonBaisuu += 1
  else :
    NiBaisuu +=1

  
if Kisuu == YonBaisuu:
  print('Yes')
else :
  if NIBaisuu == 0:
    print('Yes')
  else:
    print('No')

Buggy submission (verdict: Runtime Error):
N = int(input())
a=[int(x) for x in input().split()]
Kisuu = 0
YonBaisuu = 0
NiBaisuu = 0

for j in range(N):


  if a[0]%2 == 1:
    Kisuu += 1
    a.pop(0)
  elif a[0]%4 == 0:
    YonBaisuu += 1
    a.pop(0)
  else :
   a.pop(0)
   NiBaisuu += 1

if Kisuu == YonBaisuu:
  print('Yes')
else :
  if NIBaisuu == 0:
    print('Yes')
  else:
    print('No')