ZhenlongDai/ACPR huggingface dataset:
Problem: p03201
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):



from collections import defaultdict

N = int(input())
As = sorted(list(map(int, input().split())),reverse=True)
d = defaultdict(int)
for a in As:
    d[a] += 1
cnt = 0

for a in As:
    n = 0
    d[a] -= 1
    while 2**n <= a:
        n += 1
    p = 2**n - a
    
    if d[p] > 0:
        cnt += 1
        d[p] -= 1

print(cnt)


Failing test case input:
5
2 3 38 6 10

Expected output:
1


Actual output:
2


Fixed submission (verdict: Accepted):



from collections import defaultdict

N = int(input())
As = sorted(list(map(int, input().split())),reverse=True)
d = defaultdict(int)
for a in As:
    d[a] += 1

cnt = 0
for a in As:
    if d[a] == 0:continue
    d[a] -= 1
    n = 0
    while 2**n <= a:
        n += 1
    p = 2**n - a
    if d[p] > 0:
        cnt += 1
        d[p] -= 1

print(cnt)

Problem: p03201
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

import copy

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

pairCounter=0

beki=7
nibeki=2**beki

for i in range(N):
  target = A[i]
  if target < 0:
    continue
  A[i] = -1  

  while (nibeki > target):
    beki-=1
    nibeki=2**beki

  pair = nibeki * 2 - target
  
  
  

print(2)

Failing test case input:
5
3 21 14 5 13

Expected output:
1


Actual output:
2


Fixed submission (verdict: Accepted):

import collections

N = int(input())
A = list(map(int, input().split()))
A.sort(reverse=True)
c=collections.Counter(A)

pairCounter=0

beki=29
nibeki=2**beki

for i in range(N):
  target = A[i]
  if c[target] < 1:
    continue
  c[target]-= 1

  while (nibeki > target):
    beki-=1
    nibeki=2**beki

  pair = nibeki * 2 - target
  if pair in c.keys() and c[pair] > 0:
    c[pair]-= 1
    pairCounter+=1

print(pairCounter)
Problem: p03201
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import sys
readline = sys.stdin.readline









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

from collections import defaultdict

balls_count = defaultdict(int) 

import heapq as hq
balls_q = [] 

for a in A:
  balls_count[a] += 1
  hq.heappush(balls_q, -a)

def get_pair_num(x): 
  tar = 1
  while tar < x:
    tar *= 2
  return tar - x

ans = 0
while balls_q:
  ball = -(hq.heappop(balls_q))
  if balls_count[ball] == 0: 
    continue
  
  
  balls_count[ball] -= 1
  pair = get_pair_num(ball)
  if balls_count[pair] > 0:
    ans += 1
    balls_count[pair] -= 1
  

print(ans)

Failing test case input:
5
2 20 16 16 1

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
import sys
readline = sys.stdin.readline









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

from collections import defaultdict

balls_count = defaultdict(int) 

import heapq as hq
balls_q = [] 

for a in A:
  balls_count[a] += 1
  hq.heappush(balls_q, -a)

def get_pair_num(x): 
  tar = 2
  while tar < x:
    tar *= 2
  if tar == x:
    return tar
  return tar - x

ans = 0
while balls_q:
  ball = -(hq.heappop(balls_q))
  if balls_count[ball] == 0: 
    continue
  
  
  balls_count[ball] -= 1
  pair = get_pair_num(ball)
  if balls_count[pair] > 0:
    ans += 1
    balls_count[pair] -= 1
  

print(ans)

Problem: p03201
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from collections import Counter

n = int(input())
a = [int(item) for item in input().split()]
a.sort()
ca = Counter(a)

ans = 0
for item in a[::-1]:
    for i in range(1, 19):
        inv = (1 << i) - item
        if inv < 0:
            continue
        if ca[inv] > 0 and item != inv:
            ans += 1 
            ca[inv] -=1
            ca[item] -=1
            break
        if ca[inv] > 1 and item == inv:
            ans += 1 
            ca[inv] -= 2
            break
print(ans)

Failing test case input:
5
1 3 45 6 13

Expected output:
1


Actual output:
2


Fixed submission (verdict: Accepted):
from collections import Counter

n = int(input())
a = [int(item) for item in input().split()]
a.sort()
ca = Counter(a)
max_a = a[-1] 

ans = 0
for item in a[::-1]:
    if ca[item] == 0:
        continue
    for i in range(31, 0, -1):
        inv = (1 << i) - item
        if inv < 0 or inv > max_a:
            continue
        if item == inv:
            if ca[inv] > 1:
                ans += 1 
                ca[inv] -= 2
                break
        else:
            if ca[inv] > 0:
                ans += 1 
                ca[inv] -=1
                ca[item] -=1
                break
print(ans)
Problem: p03201
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from collections import defaultdict

N = int(input())
A = sorted(list(map(int, input().split())), reverse=True)
dic = defaultdict(int)
for a in A:
    dic[a] = 1

ans = 0
for a in A:
    if dic[a] != 0:
        b = 2**(a.bit_length()) - a
        if b != a and dic[b]:
            ans += 1
            dic[a], dic[b] = 0, 0

print(ans)

Failing test case input:
5
4 3 4 3 10

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
from collections import defaultdict

N = int(input())
A = sorted(list(map(int, input().split())), reverse=True)
dic = defaultdict(int)
for a in A:
    dic[a] += 1

ans = 0
for a in A:
    if dic[a] != 0:
        b = 2**(a.bit_length()) - a
        if dic[b] != 0:
            if b == a and dic[b] == 1:
                continue
            ans += 1
            dic[a] -= 1
            dic[b] -= 1

print(ans)

Problem: p03201
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from collections import Counter
n = int(input())
a = list(map(int, input().split()))
a.sort(reverse=True)
c = Counter(a)

ans = 0
for i in a:
    if c[i] == 0:
        continue
    c[i] -= 1
    k = 1<<((i-1).bit_length())
    j = k-i
    if j in c and c[j] > 0:
        ans += 1
        c[j] -= 1
print(ans)

Failing test case input:
5
3 24 16 16 13

Expected output:
2


Actual output:
1


Fixed submission (verdict: Accepted):
from collections import Counter
n = int(input())
a = list(map(int, input().split()))
a.sort(reverse=True)
c = Counter(a)

ans = 0
for i in a:
    if c[i] == 0:
        continue
    c[i] -= 1
    k = 1<<i.bit_length()
    j = k-i
    if j in c and c[j] > 0:
        ans += 1
        c[j] -= 1
print(ans)

Problem: p03201
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from collections import Counter
N = int(input())
A = sorted(list(map(int, input().split())), reverse=True)
C = Counter(A)
keys = set(A)

ans = 0
for a in A:
    target_2_pow = 2 ** a.bit_length()
    b = target_2_pow - a
    if b not in keys:
        continue

    if a != b:
        if C[b] == 0:
            continue
        ans += 1
        C[a] -= 1
        C[b] -= 1
    else:
        if C[b] < 2:
            continue
        ans += 1
        C[a] -= 2

print(ans)


Failing test case input:
5
6 3 2 3 10

Expected output:
1


Actual output:
2


Fixed submission (verdict: Accepted):
from collections import Counter

N = int(input())
A = sorted(list(map(int, input().split())), reverse=True)
C = Counter(A)
keys = set(A)

ans = 0
for a in A:
    target_2_pow = 2 ** a.bit_length()
    b = target_2_pow - a
    if b not in keys:
        continue

    if a != b:
        if C[a] == 0 or C[b] == 0:
            continue
    else:
        if C[b] < 2:
            continue
    ans += 1
    C[a] -= 1
    C[b] -= 1

print(ans)
Problem: p03201
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
A = list(map(int,input().split()))
A.sort(reverse=True)
dic = {}
for a in A:
    dic[a] = dic.get(a,0)+1
print(dic)
ans = 0

for a in A:
    if dic[a]==0:
        continue
    small = (1<<(len(format(a,"b")))) - a
    if dic.get(small,0)>0:
        dic[small] -= 1
        ans += 1
print(ans)


Failing test case input:
5
3 24 15 5 13

Expected output:
1


Actual output:
{24: 1, 15: 1, 13: 1, 5: 1, 3: 1}
1


Fixed submission (verdict: Accepted):
N = int(input())
A = list(map(int,input().split()))
A.sort(reverse=True)
dic = {}
for a in A:
    dic[a] = dic.get(a,0)+1
ans = 0

for a in A:
    small = (1<<(len(format(a,"b")))) - a
    if small == a:
        if dic[a] >= 2:
            dic[a] -= 2
            ans += 1
        continue
    if dic.get(a,0)>0 and dic.get(small,0)>0:
        dic[a] -= 1
        dic[small] -= 1
        ans += 1
print(ans)
Problem: p03298
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):

import sys

input=sys.stdin.readline

n=int(input())
s=input().strip()

memo={}
def getans(a,b,c):
    while a and c and a[0]==c[-1]:
        a=a[1:]
        c=c[:-1]
    if b=="":
        if a=="" and c=="": return 1
        else: return 0
    key=a+"/"+b+"/"+c
    if key in memo: return memo[key]
    
    ans=0
    for i in range(1,len(b)):
        if b[0]==b[i]:
            ans+=getans(a,b[1:i],b[i+1:]+c)
    
    ans+=getans(a+b[0],b[1:],c)
    memo[key]=ans
    
    return ans

print(getans("",s,"")*2)

print(len(memo))

Failing test case input:
4
acaa`c`c

Expected output:
0


Actual output:
0
22


Fixed submission (verdict: Accepted):

import sys

input=sys.stdin.readline

n=int(input())
s=input().strip()

memo={}
def getans(a,b,c):
    while a and c and a[0]==c[-1]:
        a=a[1:]
        c=c[:-1]
    if b=="":
        if a=="" and c=="": return 1
        else: return 0
    key=a+"/"+b+"/"+c
    if key in memo: return memo[key]
    
    ans=0
    for i in range(1,len(b)):
        if b[0]==b[i]:
            ans+=getans(a,b[1:i],b[i+1:]+c)
    
    ans+=getans(a+b[0],b[1:],c)
    memo[key]=ans
    
    return ans

print(getans("",s,"")*2)
Problem: p02943
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n,k=map(int,input().split())
s=input()
t=s[::-1]
u="".join([s,t])
ls=[]
for i in range(n):
  ls.append(u[i:i+n])
ls.sort()
k-=1
x=ls[0]
cnt=1
for i in range(1,n):
  if x[0]==x[i]:
    cnt+=1
  else:
    break
if cnt*2**k<n:
  y=n-cnt*2**k
  print(x[0]*(cnt*2**k)+x[cnt:y+1])
else:
  print(x[0]*n)


Failing test case input:
10 2
bbaabbbbbb

Expected output:
aaaabbbbbb


Actual output:
aaaabbbbb


Fixed submission (verdict: Accepted):
n,k=map(int,input().split())
s=input()
t=s[::-1]
u="".join([s,t])
ls=[]
for i in range(n):
  ls.append(u[i:i+n])
ls.sort()
k-=1
x=ls[0]
cnt=1
for i in range(1,n):
  if x[0]==x[i]:
    cnt+=1
  else:
    break
if cnt*2**k<n:
  y=n-cnt*2**k
  print(x[0]*(cnt*2**k)+x[cnt:y+cnt])
else:
  print(x[0]*n)

Problem: p02943
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,k=map(int,input().split())
s=input()
j=1
cnt=1
while j<n:
    j*=2
    cnt+=1
if k>=cnt:print(min(s)*n)
else:
    if k==1:
        minstr=s+s[::-1]
    for i in range(k-1):
        s=s+s[::-1]
        minstr=s[:n]
        for j in range(n+1):
            if s[j:j+n]<minstr:
                minstr=s[j:j+n]
    if k>=2:
        minstr=minstr[::-1]+minstr
    ans=minstr[:n]
    for i in range(n+1):
        if ans > minstr[i:i+n]:
            ans=minstr[i:i+n]
    print(ans)

Failing test case input:
10 3
baabbababa

Expected output:
aaaaaaaaba


Actual output:
aaaabababb


Fixed submission (verdict: Accepted):
n,k=map(int,input().split())
s=input()
j=1
cnt=1
while j<n:
    j*=2
    cnt+=1
if k>=cnt:print(min(s)*n)
else:
    if k==1:
        minstr=s+s[::-1]
    for i in range(k-1):
        s=s+s[::-1]
        minstr=s[:n]
        for j in range(n+1):
            if s[j:j+n]<minstr:
                minstr=s[j:j+n]
        s=minstr[::-1]
    if k>=2:
        minstr=minstr[::-1]+minstr
    ans=minstr[:n]
    for i in range(n+1):
        if ans > minstr[i:i+n]:
            ans=minstr[i:i+n]
    print(ans)

Problem: p02943
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, K = map(int,input().split())
S = input()

lex_min = "z"
for char in S:
  lex_min = min(char, lex_min)

if (1 << (K - 1)) > N:
  print(lex_min * N)
else:
  U = S + S[::-1]
  candidates = []
  for i in range(N, N << 1):
    if U[i] == lex_min:
      M = U[i-N+1:i+1]
      if K > 1:
        candidates.append((1 << (K - 1)) * lex_min + M[:N - (1 << (K - 1))])
      else:
        candidates.append(M)
  print(min(candidates))
      

Failing test case input:
5 1
abcba

Expected output:
aabcb


Actual output:
abcba


Fixed submission (verdict: Accepted):
N, K = map(int,input().split())
S = input()

lex_min = "z"
for char in S:
  lex_min = min(char, lex_min)

U = S + S[::-1]

L = 0
L_max = 0
for i in range(N << 1):
  if U[i] == lex_min:
    L_max += 1
  else:
    L = max(L, L_max)
    L_max = 0
L = max(L, L_max)

if (1 << (K - 1)) * L >= N:
  print(lex_min * N)
else:
  candidates = []
  n = (1 << (K - 1)) * L
  for i in range(N, N << 1):
    if U[i-L+1:i+1] == L * lex_min:
      cand = n * lex_min + U[i-N+n-L+1:i-L+1][::-1]
      candidates.append(cand)
      
  print(min(candidates))
Problem: p02943
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n, k = map(int, input().split())
s = input()
m = min(s)
if k >= 20:
    print(m * n)
else:
    for p in range(k):
        u = s + s[::-1]
        l = []
        cnt = 0
        idx = 0
        for i in range(n * 2):
            if u[i] == m:
                if cnt == 0:
                    idx = i
                cnt += 1
            else:
                if cnt > 0:
                    l.append((cnt, idx))
                    cnt = 0
        if cnt > 0:
            l.append((cnt, idx))
        a, j = max(l)
        for c, i in l:
            if i <= n and c == a:
                s = min(s, u[i:i + n])
        if (k - p) % 2 == 0:
            s = s[::-1]
    print(s)


Failing test case input:
5 3
`bcaa

Expected output:
````b


Actual output:
``bca


Fixed submission (verdict: Accepted):
n, k = map(int, input().split())
s = input()
m = min(s)
for p in range(k):
    u = s + s[::-1]
    l = []
    cnt = 0
    idx = 0
    for i in range(n * 2):
        if u[i] == m:
            if cnt == 0:
                idx = i
            cnt += 1
        else:
            if cnt > 0:
                l.append((cnt, idx))
                cnt = 0
    if cnt > 0:
        l.append((cnt, idx))
    a, j = max(l)
    if a >= n:
        print(m * n)
        exit(0)
    for c, i in l:
        if i <= n and c == a:
            s = min(s, u[i:i + n])
    s = s[::-1]
print(s[::-1])

Problem: p02943
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,k=map(int,input().split())
s=input()
d=s+s[::-1]
d=d[::-1]
r=d[:n]
e=d[:n]
for i in range(n):
    e=e[1:]+d[n+i]
    r=min(r,e)
t=1
qo=r[0]
for i in range(1,n):
    if qo==r[i]:
        t+=1
    else:
        break
r=r[::-1]
print(r)
for i in range(k-1):
    p=r+r[n-t:]
    p=p[::-1]
    p=p[:n]
    if r==p:
        break
    else:
        r=p[::-1]
        t+=t
print(r[::-1])

Failing test case input:
10 1
baaabbbaab

Expected output:
aaabbbaabb


Actual output:
bbaabbbaaa
aaabbbaabb


Fixed submission (verdict: Accepted):
n,k=map(int,input().split())
s=input()
d=s+s[::-1]
d=d[::-1]
r=d[:n]
e=d[:n]
for i in range(n):
    e=e[1:]+d[n+i]
    r=min(r,e)
t=1
qo=r[0]
for i in range(1,n):
    if qo==r[i]:
        t+=1
    else:
        break
r=r[::-1]
for i in range(k-1):
    p=r+r[n-t:]
    p=p[::-1]
    p=p[:n]
    if r==p:
        break
    else:
        r=p[::-1]
        t+=t
print(r[::-1])
Problem: p02943
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
from math import floor, log
inpl = lambda: list(map(int,input().split()))
N, K = inpl()
S = input()
U = S + S[::-1]
Sp = sorted([ U[i:i+N] for i in range(N+1)])[0]
n = 0
while Sp[n] == Sp[0]:
    n += 1

if K > int(floor(log(N/n)/log(2))):
    print(Sp[0]*N)
else:
    m = n * (2**(K-1))
    if m >= N:
        print(Sp[0]*N)
    else:
        print(Sp[0]*m + Sp[n:n+N-m])


Failing test case input:
5 2
ca``a

Expected output:
````a


Actual output:
`````


Fixed submission (verdict: Accepted):
from math import floor, log
inpl = lambda: list(map(int,input().split()))
N, K = inpl()
S = input()
U = S + S[::-1]
Sp = sorted([ U[i:i+N] for i in range(N+1)])[0]
n = 0
while Sp[n] == Sp[0]:
    n += 1

if K > int(floor(log(N/n)/log(2))) + 1:
    print(Sp[0]*N)
else:
    m = n * (2**(K-1))
    if m >= N:
        print(Sp[0]*N)
    else:
        print(Sp[0]*m + Sp[n:n+N-m])
Problem: p02784
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
h, n = map(int, input().split())
a = list(map(int, input().split()))
if sum(a) >= h:
   print("yes")
else:
   print("no")

Failing test case input:
383 23
2 33 59 40 0

Expected output:
No


Actual output:
no


Fixed submission (verdict: Accepted):
h, n = map(int, input().split())
a = list(map(int, input().split()))
if sum(a) >= h:
   print("Yes")
else:
   print("No")

Problem: p02784
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
n,k=map(int,input().split())
l=list(map(int,input().split()))
if sum(l)>=n:
    print("YES")
else:
    print("NO")


Failing test case input:
210 3
31 34 59 26 53

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):
import math
n,k=map(int,input().split())
l=list(map(int,input().split()))
if sum(l)>=n:
    print('Yes')
else:
    print('No')

Problem: p02784
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math

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

a_sum = sum(a)

if h <= a_sum:
    print('YES')
else:
    print('NO')

Failing test case input:
383 23
2 33 59 40 0

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):
import math

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

a_sum = sum(a)

if h <= a_sum:
    print('Yes')
else:
    print('No')

Problem: p02784
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math

a,b=map(int,input().split())
array = map(int,input().split())

sum = 0

for skill in array:
  a -= skill
if(a <= 0):
  print("yes")
else:
  print("no")


Failing test case input:
20 3
3 3 6

Expected output:
No


Actual output:
no


Fixed submission (verdict: Accepted):
import math

a,b=map(int,input().split())
array = map(int,input().split())

sum = 0

for skill in array:
  a -= skill
if(a <= 0):
  print("Yes")
else:
  print("No")

Problem: p02784
Buggy submission (Python (3.4.3), verdict: Wrong Answer):


def main():
	H,N=map(int, input().split())
	A = [int(_) for _ in input().split()]
	if sum(A)>=H:
		print('YES')
	else:
		print('NO')
main()

Failing test case input:
20 3
3 4 6

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):


def main():
	H,N=map(int, input().split())
	A = [int(_) for _ in input().split()]
	if sum(A)>=H:
		print('Yes')
	else:
		print('No')
main()

Problem: p02784
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x, y = map(int, input().split())
a = list(map(int, input().split()))
print("yes" if sum(a) >= x else "no")

Failing test case input:
383 35
3 36 19 4 0

Expected output:
No


Actual output:
no


Fixed submission (verdict: Accepted):
x, y = map(int, input().split())
a = list(map(int, input().split()))
print("Yes" if sum(a) >= x else "No")
Problem: p02784
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
H, N = map(int,input().split())
Ai = list(map(int,input().split()))
Ai_sum = sum(Ai)
if Ai_sum >= H:
    print('YES')
else:
    print('NO')

Failing test case input:
14 4
3 2 0

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):
H, N = map(int,input().split())
Ai = list(map(int,input().split()))
Ai_sum = sum(Ai)
if Ai_sum >= H:
    print('Yes')
else:
    print('No')

Problem: p02784
Buggy submission (Python (3.4.3), verdict: Wrong Answer):




def solve(H, N, A):
    if (sum(A) > H):
        return 'Yes'
    return 'No'




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








print(solve(H, N, A))


Failing test case input:
210 3
31 41 59 26 53

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):




def solve(H, N, A):
    if (sum(A) >= H):
        return 'Yes'
    return 'No'




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








print(solve(H, N, A))

Problem: p02784
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
h,n=map(int,input().split())
l=list(map(int,input().split()))
print('Yes' if sum(l)>h else 'No')

Failing test case input:
210 5
31 41 59 26 53

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
h,n=map(int,input().split())
l=list(map(int,input().split()))
print('Yes' if sum(l)>=h else 'No')

Problem: p02784
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
h, n = map(int,input().split())
a = list(map(int, input().split()))

if sum(a) >= h:
    print("yes")
else:
    print("No")



Failing test case input:
55 2
2 103 59 57 53

Expected output:
Yes


Actual output:
yes


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

if sum(a) >= h:
    print("Yes")
else:
    print("No")

Problem: p02784
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
list1 = input().split(' ')
list2 = input().split(' ')
list2 =  [int(s) for s in list2]

num = int(list1[1])
HP = int(list1[0])
D = 0
for N in list2:
  D += N
  
if D > HP:
  print('Yes')
else:
  print('No')

Failing test case input:
210 5
31 41 59 26 53

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
list1 = input().split(' ')
list2 = input().split(' ')
list2 =  [int(s) for s in list2]

num = int(list1[1])
HP = int(list1[0])
D = 0
for N in list2:
  D += N

if D >= HP:
  print('Yes')
else:
  print('No')

Problem: p02784
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = input().split()
h, n = int(a[0]), int(a[1])
nums = input().split()
nums = list(map(int, nums))
x = sum(nums)

if x >= h:
  print("yes")
else:
  print("no")

Failing test case input:
16 2
2 103 59 57 53

Expected output:
Yes


Actual output:
yes


Fixed submission (verdict: Accepted):
a = input().split()
h, n = int(a[0]), int(a[1])
nums = input().split()
nums = list(map(int, nums))
x = h - sum(nums)
if x <= 0:
  print("Yes")
else:
  print("No")
Problem: p02784
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
h, n = map(int, input().split())
A = list(map(int, input().split()))

sum_a = sum(A)
if h - sum_a < 0:
    print("Yes")
else:
    print("No")

Failing test case input:
210 3
31 41 59 26 53

Expected output:
Yes


Actual output:
No


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

sum_a = sum(A)
if h - sum_a <= 0:
    print("Yes")
else:
    print("No")

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

if H < sum(A):
    print('Yes')
else:
    print('No')

Failing test case input:
210 3
31 41 59 26 53

Expected output:
Yes


Actual output:
No


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

if H <= sum(A):
    print('Yes')
else:
    print('No')

Problem: p02784
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
val = input().split(' ')
h = int(val[0])
n = int(val[1])
skills = [int(i) for i in input().split(' ')]

able = False
for i in skills:
    h -= i
    if h <= 0:
        able = True
        break

print(able)


Failing test case input:
210 3
31 41 59 26 53

Expected output:
Yes


Actual output:
True


Fixed submission (verdict: Accepted):
val = input().split(' ')
h = int(val[0])
n = int(val[1])
skills = [int(i) for i in input().split(' ')]

able = 'No'
for i in skills:
    h -= i
    if h <= 0:
        able = 'Yes'
        break

print(able)

Problem: p02784
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
H,N = map(int,input().split())
A = list(map(int,input().split()))
if sum(A)>=H:print("yes")
else:print("No")

Failing test case input:
127 2
2 59 59 57 53

Expected output:
Yes


Actual output:
yes


Fixed submission (verdict: Accepted):
H,N = map(int,input().split())
A = list(map(int,input().split()))
if sum(A)>=H:print("Yes")
else:print("No")

Problem: p02784
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
H, N = list(map(int, input().split(' ')))
A_list = list(map(int, input().split(' ')))
sum_atack = sum(A_list)
if sum_atack >= H:
    print('YES')
else:
    print('NO')

Failing test case input:
127 3
1 59 59 33 53

Expected output:
Yes


Actual output:
YES


Fixed submission (verdict: Accepted):
H, N = list(map(int, input().split(' ')))
A_list = list(map(int, input().split(' ')))
sum_atack = sum(A_list)
if sum_atack >= H:
    print('Yes')
else:
    print('No')

Problem: p02784
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
H,N=map(int,input().split())
A=map(int,input().split())
B=sum(A)
ans='YES'
if B<H:
  ans='NO'
print(ans)

Failing test case input:
66 4
-1 6 17

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):
H,N=map(int,input().split())
A=map(int,input().split())
B=sum(A)
ans='Yes'
if B<H:
  ans='No'
print(ans)
Problem: p02784
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
H, _ = map(int, input().split(" "))
print("Yes" if sum(map(int, input().split(" "))) <= H else "No")

Failing test case input:
20 4
3 4 6

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
H, _ = map(int, input().split(" "))
print("Yes" if sum(map(int, input().split(" "))) >= H else "No")

Problem: p02784
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
h,n=map(int,input().split())
a=map(int,input().split())
s=sum(a)

if s>=h:
    print("YES")
else:
    print("NO")

Failing test case input:
25 4
2 2 0

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):
h,n=map(int,input().split())
a=map(int,input().split())
s=sum(a)

if s>=h:
    print("Yes")
else:
    print("No")

Problem: p02784
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
h, b = list(map(int, input().split()))
a = sorted(list(map(int, input().split())), reverse=True)
for i in a:
    h -= i
    if h < 0:
        print('Yes')
        exit()
print('No')

Failing test case input:
210 3
31 41 59 26 53

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
h, b = list(map(int, input().split()))
a = sorted(list(map(int, input().split())), reverse=True)
for i in a:
    h -= i
    if h <= 0:
        print('Yes')
        exit()
print('No')

Problem: p02784
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
h,n = map(int, input().split())
a = list(map(int, input().split()))

if sum(a) >= h:
    print('YES')
else:
    print('NO')


Failing test case input:
36 4
1 6 13

Expected output:
No


Actual output:
NO


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

if sum(a) >= h:
    print('Yes')
else:
    print('No')

Problem: p02784
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
h, n = map(int, input().split())
a = input()
alst = []
for i in a.split():
    alst.append(int(i))
if sum(alst) > int(h):
    print("Yes")
else:
    print("No")


Failing test case input:
210 5
31 41 59 26 53

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
h, n = map(int, input().split())
a = input()
alst = []
for i in a.split():
    alst.append(int(i))
if sum(alst) >= int(h):
    print("Yes")
else:
    print("No")

Problem: p02784
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
h,n=map(int,input().split())
l=list(map(int,input().split()))
l=sorted(l)
a=l[-2:]
if sum(a)>=h:
  print("Yes")
else:
  print("No")


Failing test case input:
210 3
31 55 59 26 53

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
h,n=map(int,input().split())
l=map(int,input().split())

n=sum(l)
if n>=h:
  print('Yes')
else:
  print('No')
Problem: p02784
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
h, n = map(int, input().split())
a = sum(list(map(int, input().split())))
print("Yes") if h<a else print("No")

Failing test case input:
10 3
4 0 6

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
h, n = map(int, input().split())
a = sum(list(map(int, input().split())))
print("Yes") if h<=a else print("No")

Problem: p02784
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,m = map(int,input().split())
a = list(map(int,input().split()))

if sum(a) > n:
  print("YES")
else:
  print("NO")

Failing test case input:
211 9
22 29 59 26 5

Expected output:
No


Actual output:
NO


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

if sum(a) >= n:
  print("Yes")
else:
  print("No")

Problem: p02784
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
a,b=[int(i) for i in input().split()]
c=[int(i) for i in input().split()]
if(sum(c)>=210):
    print('Yes')
else:
    print('No')

Failing test case input:
10 3
4 5 6

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
a,b=[int(i) for i in input().split()]
c=[int(i) for i in input().split()]
if(sum(c)>=a):
    print('Yes')
else:
    print('No')

Problem: p02784
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math

h, n = map(int, input().split())
a = [int(i) for i in input().split()]

if sum(a) >= h:
  print('yes')
else:
  print('no')

Failing test case input:
127 3
1 59 59 33 53

Expected output:
Yes


Actual output:
yes


Fixed submission (verdict: Accepted):
h, n = map(int, input().split())
a = [int(i) for i in input().split()]

if sum(a) >= h:
  print('Yes')
else:
  print('No')

Problem: p02784
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
H, N = map(int, input().split())
A = list(map(int, input().split()))
print(sum(A))
if sum(A) >= H:
    print("Yes")
else:
    print("No")

Failing test case input:
182 3
1 59 59 33 53

Expected output:
Yes


Actual output:
205
Yes


Fixed submission (verdict: Accepted):
H, N = map(int, input().split())
A = list(map(int, input().split()))
if sum(A) >= H:
    print("Yes")
else:
    print("No")

Problem: p02784
Buggy submission (Python (3.4.3), verdict: Wrong Answer):


import sys






read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

H, N,*A = map(int, readline().split())
print('YES' if H<=sum(A) else 'No')

Failing test case input:
16 2
2 103 59 57 79

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):


import sys






read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

H, N,*A = map(int, read().split())
print('Yes' if H<=sum(A) else 'No')
Problem: p02784
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
H, N = map(int, input().split())
A = list(map(int, input().split()))

SA = sum(A)
print(H - SA)

if H - SA <= 0:
    print("Yes")

elif H - SA > 0:
    print("No")

Failing test case input:
211 20
2 22 59 26 0

Expected output:
No


Actual output:
102
No


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

SA = sum(A)


if H <= SA:
    print("Yes")

elif H > SA:
    print("No")

Problem: p02784
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
H,N = input().split()
A = input().split()
H = int(H)
N = int(N)
Aintlist = [int(s) for s in A]
print(Aintlist)
sumdata = 0
for i in range(0,len(Aintlist)):
    sumdata += Aintlist[i]

if sumdata >= H:
    print('Yes')
else:
    print('No')

Failing test case input:
17 4
4 1 1

Expected output:
No


Actual output:
[4, 1, 1]
No


Fixed submission (verdict: Accepted):
H,N = input().split()
A = input().split()
H = int(H)
N = int(N)
Aintlist = [int(s) for s in A]
sumdata = 0
for i in range(0,len(Aintlist)):
    sumdata += Aintlist[i]

if sumdata >= H:
    print('Yes')
else:
    print('No')

Problem: p02784
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
H, N = map(int, input().split())
move = [int(a) for a in map(int, input().split())]

smove = sum(move)
if smove > H:
    print("Yes")
else:
    print("No")

Failing test case input:
210 3
31 41 59 26 53

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
H, N = map(int, input().split())
move = [int(a) for a in map(int, input().split())]

H -= sum(move)
if 0 >= H:
    print("Yes")
else:
    print("No")

Problem: p02784
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
H, N = list(map(int, input().split()))
A = list(map(int, input().split()))

if H < sum(A):
    print('yes')
else:
    print('no')


Failing test case input:
66 3
-1 6 17

Expected output:
No


Actual output:
no


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

if H <= sum(A):
    print('Yes')
else:
    print('No')

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

if sum(a) > H:
    print("Yes")
else:
    print("No")

Failing test case input:
210 5
31 41 59 26 53

Expected output:
Yes

Actual output:
No


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

if sum(a) >= H:
    print("Yes")
else:
    print("No")

Problem: p02784
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
H, N = map(int, input().split())
lst = [int(x) for x in input().split()]
if N >= sum(lst):
    print("Yes")
else:
    print("No")

Failing test case input:
10 3
4 0 6

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
H, N = map(int, input().split())
lst = [int(x) for x in input().split()]
if sum(lst) >= H:
    print("Yes")
else:
    print("No")
Problem: p02784
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
h,n=[int(i) for i in input().split()]
t=[int(i) for i in input().split()]
if sum(t)>=h:print("yes")
else:print("no")

Failing test case input:
16 2
4 26 13 57 3

Expected output:
Yes


Actual output:
yes


Fixed submission (verdict: Accepted):
h,n=[int(i) for i in input().split()]
t=[int(i) for i in input().split()]
if sum(t)>=h:print("Yes")
else:print("No")

Problem: p02784
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):

H , N = map(int,input().split())
A = map(int,input().split())
if H - sum(A) < 0:
  print("Yes")
else:
  print("No")

Failing test case input:
210 3
31 41 59 26 53

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):

H , N = map(int,input().split())
A = map(int,input().split())
if H - sum(A) <= 0:
  print("Yes")
else:
  print("No")

Problem: p02784
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
h, n = map(int, input().split())
a = map(int, input().split())
if h < sum(a):
  print('Yes')
else:
  print('No')

Failing test case input:
210 5
31 41 59 26 53

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
h, n = map(int, input().split())
a = map(int, input().split())
if h <= sum(a):
  print('Yes')
else:
  print('No')

Problem: p02784
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
h, n= map(int, input().split())
a = list(map(int, input().strip().split()))
total = sum(a) 
print(total)
if(h>total):
    print('No')
else:
    print('Yes')

Failing test case input:
17 4
3 2 0

Expected output:
No


Actual output:
5
No


Fixed submission (verdict: Accepted):
h, n= map(int, input().split())
a = list(map(int, input().strip().split()))
total = sum(a) 
if(h>total):
    print('No')
else:
    print('Yes')

Problem: p02784
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
H,N=map(int,input().split())
A=list(map(int, input().split()))
if sum(A)>=H:
  print("YES")
else:
  print("NO")

Failing test case input:
36 4
1 4 6

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):
H,N=map(int,input().split())
A=list(map(int, input().split()))
if sum(A)>=H:
  print("Yes")
else:
  print("No")

Problem: p02784
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
H, N= map(int,input().split())
A = list(map(int,input().split()))
if sum(A) >= H:
	print("yes")
else:
	print("No")

Failing test case input:
10 3
4 5 6

Expected output:
Yes

Actual output:
yes


Fixed submission (verdict: Accepted):
H, N= map(int,input().split())
A = list(map(int,input().split()))
if sum(A) >= H:
	print("Yes")
else:
	print("No")

Problem: p02784
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,K = [int(x) for x in input().split()]
n=[int(x) for x in input().split()]
print("Yes" if sum(n)>N else "No")

Failing test case input:
10 3
4 0 6

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
N,K = [int(x) for x in input().split()]
n=[int(x) for x in input().split()]
print("Yes" if sum(n)>=N else "No")
Problem: p02784
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
h,n = map(int,input().split())

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


if h >= sum(a):
    print("No")

else:
    print("Yes")

Failing test case input:
210 5
31 41 59 26 53

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
h,n = map(int,input().split())

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


if h > sum(a):
    print("No")

else:
    print("Yes")

Problem: p02784
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
h, a = map(int, input().split(" "))
aL = list(map(int, input().split(" ")))

if sum(aL) >= a:
    print("Yes")
    exit()
print("No")

Failing test case input:
17 4
3 1 1

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
h, a = map(int, input().split(" "))
aL = list(map(int, input().split(" ")))

if sum(aL) >= h:
    print("Yes")
    exit()
print("No")

Problem: p02784
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
h, n = map(int, input().split())
an = list(map(int, input().split()))

if sum(an) > h:
  print('No')
else:
  print('Yes')

Failing test case input:
16 2
4 26 13 57 3

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
h, n = map(int, input().split())
an = list(map(int, input().split()))

if sum(an) >= h:
  print('Yes')
else:
  print('No')

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

total = sum(A)

if(total > H):
  print("Yes")
else:
  print("No")

Failing test case input:
210 3
31 41 59 26 53

Expected output:
Yes


Actual output:
No


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

total = sum(A)

if(total >= H):
  print("Yes")
else:
  print("No")

Problem: p02784
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
l1 = input().strip().split()
h = int(l1[0])
n = int(l1[1])
a = sorted([int(i) for i in input().strip().split()], reverse=True)
if h < sum(a[:n-1]):
    print("Yes")
else:
    print("No")



Failing test case input:
210 3
31 55 59 26 53

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
l1 = input().strip().split()
h = int(l1[0])
n = int(l1[1])
asum = sum([int(i) for i in input().strip().split()])
if h <= asum:
    print("Yes")
else:
    print("No")

Problem: p02784
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math

a,b=map(int,input().split())
array = map(int,input().split())

sum = 0

for skill in array:
  sum += skill

if(sum >= a):
  print("yes")
else:
  print("no")



Failing test case input:
210 3
31 34 59 26 53

Expected output:
No


Actual output:
no


Fixed submission (verdict: Accepted):
import math

a,b=map(int,input().split())
array = map(int,input().split())

sum = 0

for skill in array:
  a -= skill
if(a <= 0):
  print("Yes")
else:
  print("No")
Problem: p02784
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
H,N=map(int,input().split())
A=list(map(int,input().split()))
AA=sum(A)
if H<=AA:
    print('Yes')
else:
    print('NO')

Failing test case input:
211 9
31 29 59 26 5

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):
H,N=map(int,input().split())
A=list(map(int,input().split()))
AA=sum(A)
if H<=AA:
    print('Yes')
else:
    print('No')

Problem: p02784
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
h, a = map(int, input().split(" "))
aL = list(map(int, input().split(" ")))

if sum(aL) <= h:
    print("Yes")
    exit()
print("No")

Failing test case input:
10 4
3 2 0

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
h, a = map(int, input().split(" "))
aL = list(map(int, input().split(" ")))

if sum(aL) >= h:
    print("Yes")
    exit()
print("No")

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

SA = sum(A)
print(H - SA)

if H <= SA:
    print("Yes")

elif H > SA:
    print("No")

Failing test case input:
16 2
4 38 13 57 3

Expected output:
Yes


Actual output:
-99
Yes


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

SA = sum(A)


if H <= SA:
    print("Yes")

elif H > SA:
    print("No")

Problem: p02784
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
h,n=map(int,input().split())
l=[int(x) for x in input().split()]
if sum(l)>=h:
    print("YES")
else:
    print("NO")


Failing test case input:
210 3
31 41 59 26 53

Expected output:
Yes


Actual output:
YES


Fixed submission (verdict: Accepted):
h,n=map(int,input().split())
l=[int(x) for x in input().split()]
if sum(l)>=h:
    print("Yes")
else:
    print("No")

Problem: p02784
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = list(map(int, input().split()))
A = list(map(int, input().split()))
H , N = S[0], S[1]
for i in A:
    N -= i
if N <= 0:
    print('Yes')
else:
    print('No')

Failing test case input:
20 4
3 4 6

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
S = list(map(int, input().split()))
A = list(map(int, input().split()))
H , N = S[0], S[1]
for i in A:
    H -= i
if H <= 0:
    print('Yes')
else:
    print('No')

Problem: p02784
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
h, n = list(map(int,input().split()))
a = list(map(int,input().split()))

if(sum(a) > h):
    print('Yes')
else:
    print('No')

Failing test case input:
210 3
31 41 59 26 53

Expected output:
Yes


Actual output:
No


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

if(sum(a) >= h):
    print('Yes')
else:
    print('No')
Problem: p02784
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
H,N = map(int,input().split())
A = list(map(int,input().split()))
if H-sum(A) < 0:
  print('Yes')
else:
  print('No')

Failing test case input:
210 5
31 41 59 26 53

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
H,N = map(int,input().split())
A = list(map(int,input().split()))
if H-sum(A) <= 0:
  print('Yes')
else:
  print('No')

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

if H < A:
    print('Yes')
else:
    print('No')

Failing test case input:
210 3
31 41 59 26 53

Expected output:
Yes


Actual output:
No


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

if H <= A:
    print('Yes')
else:
    print('No')

Problem: p02784
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
h, n  = map(int,input().split())
a=list(map(int,input().split()))
if sum(a) > h:
    print('Yes')
else:
    print('No')
    

Failing test case input:
210 3
31 41 59 26 53

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
h, n  = map(int,input().split())
a=list(map(int,input().split()))
if sum(a) >= h:
    print('Yes')
else:
    print('No')

Problem: p02784
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
 
 
hp, length = [int(v) for v in input().split(' ')]
 
if length < 2:
    print('No')
    sys.exit(0)
    
 
damages = sorted([int(d) for d in input().split(' ')])
 
 
if damages[-1] + damages[-2] >= hp:
    print('Yes')
else:
    print('No')

Failing test case input:
127 2
1 59 59 33 53

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
import sys
 
 
hp, length = [int(v) for v in input().split(' ')]
damages = sorted([int(d) for d in input().split(' ')])
 
 
for d in reversed(damages):
    hp -= d
    if hp <= 0:
        print('Yes')
        sys.exit(0)

print('No')

Problem: p02784
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
H,N=map(int,input().split())
"NYoe s"[H<=sum(map(int,input().split()))::2]

Failing test case input:
211 13
37 29 59 26 0

Expected output:
No


Actual output:

Fixed submission (verdict: Accepted):
H,N=map(int,input().split())
print("NYoe s"[H<=sum(map(int,input().split()))::2])

Problem: p02784
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
H,N = map(int,input().split())
A = list(map(int,input().split()))
sum=0
for a in A:
    sum += a
print("Yes") if sum> H else print("No") 

Failing test case input:
210 3
31 41 59 26 53

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
H,N = map(int,input().split())
A = list(map(int,input().split()))
sum=0
for a in A:
    sum += a
print("Yes") if sum >= H else print("No")
Problem: p02784
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
H, N = map(int, input().split())
a = list(map(int, input().split()))

if H > sum(a):
  print('NO')
else:
  print('YES')


Failing test case input:
20 3
5 0 6

Expected output:
No


Actual output:
NO


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

if H > sum(a):
  print('No')
else:
  print('Yes')

Problem: p02784
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

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

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

S = sum(A)

print("yes" if H <= S else "no")

Failing test case input:
211 13
37 21 59 26 0

Expected output:
No


Actual output:
no


Fixed submission (verdict: Accepted):

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

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

S = sum(A)

print("Yes" if H <= S else "No")

Problem: p02784
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b=input().split()
l = list(map(int, input().split()))
a=int(a)
b=int(b)
if a >= sum(l):
  print('Yes')

else:
  print('No')


Failing test case input:
8 3
3 1 6

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
a,b=input().split()
l = list(map(int, input().split()))
a=int(a)
b=int(b)
if a <= sum(l):
  print('Yes')

else:
  print('No')

Problem: p02784
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
h ,n =map(int,input().split())
a =list(map(int,input().split()))

if sum(a) >= h:
    print("No")
    
else:
    print("Yes")

Failing test case input:
127 2
2 99 59 57 53

Expected output:
Yes


Actual output:
No


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

if sum(a) >= h:
    print("Yes")
else:
    print("No")

Problem: p02784
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b = map(float, input().split())
attack_list = list(map(float, input().split()))


print(sum(attack_list))


if(a <= sum(attack_list)):
    print("Yes")
else:
    print("No")

Failing test case input:
20 3
3 0 6

Expected output:
No


Actual output:
9.0
No


Fixed submission (verdict: Accepted):
a, b = map(float, input().split())
attack_list = list(map(float, input().split()))

if(a <= sum(attack_list)):
    print("Yes")
else:
    print("No")

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

all_damege = 0
for i in Ai:
    all_damege+=i
if H<all_damege:
    print('Yes')
elif H>=all_damege:
    print('No')

Failing test case input:
210 5
31 41 59 26 53

Expected output:
Yes

Actual output:
No


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

all_damege = 0
for i in Ai:
    all_damege+=i
if H<=all_damege:
    print('Yes')
else:
    print('No')