Problem:


Score : 200 points

Problem Statement

Raccoon is fighting with a monster.

The health of the monster is H.

Raccoon can use N kinds of special moves. Using the i-th move decreases the monster's health by A_i.
There is no other way to decrease the monster's health.

Raccoon wins when the monster's health becomes 0 or below.

If Raccoon can win without using the same move twice or more, print Yes; otherwise, print No.

Constraints

1 \leq H \leq 10^9

1 \leq N \leq 10^5

1 \leq A_i \leq 10^4

All values in input are integers.

Input

Input is given from Standard Input in the following format:

H N
A_1 A_2 ... A_N

Output

If Raccoon can win without using the same move twice or more, print Yes; otherwise, print No.

Sample Input 1

10 3
4 5 6

Sample Output 1

Yes

The monster's health will become 0 or below after, for example, using the second and third moves.

Sample Input 2

20 3
4 5 6

Sample Output 2

No

Sample Input 3

210 5
31 41 59 26 53

Sample Output 3

Yes

Sample Input 4

211 5
31 41 59 26 53

Sample Output 4

No



Sample input:
10 3
4 5 6


Sample output:
Yes

Submission status: Accepted

Solution code:
x = list(map(int, input().split()))
a = list(map(int, input().split()))
hp = x[0]
for i in a:
  hp -= i
if hp <= 0:
  print('Yes')
else:
  print('No')

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
H,N = map(int,input().split())
A = [int(i) for i in input().split()]
A.sort(reverse=True)

if sum(A[0:N]) >= H:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:

def main():
    H,N  = map(int, input().split()) 
    A = list(map(int, input().split())) 
    if H<=sum(A):
        print('Yes')
    else:
        print('No')



if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

A.sort()
for i in range(len(A)):
  if H > 0:
    H -= A[len(A)-1-i]
  else:
    print("Yes")
    exit()
if H > 0:
  print("No")
else:
  print("Yes")

Submission status: Accepted

Solution code:
h,n=map(int,input().split())
a=list(map(int,input().split()))
if sum(a)>=h:
  print('Yes')
  
else:
  print('No')

Submission status: Accepted

Solution code:
H,N = map(int,input().split())
A = list(map(int,input().split()))
S = 0
for i in range(N):
  S += A[i]
if H > S:
  print('No')
else:
  print('Yes')

Submission status: Accepted

Solution code:
H, N = map(int, input().split())
A = list(map(int, input().split()))
print('Yes' if sum(A) >= H else 'No')

Submission status: Accepted

Solution code:
def main():
    h, n = list(map(int, input().split()))
    a = list(map(int, input().split()))
    
    print("Yes" if sum(a) >= h else "No")
    
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
H, N = map(int, input().split())

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

s = sum(A)

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

Submission status: Accepted

Solution code:
h, n = map(int, input().split())
a_list = list(map(int, input().split()))

d = 0
for a in a_list:
    d += a

if d < h:
    print("No")
else:
    print("Yes")

Submission status: Accepted

Solution code:
h,n=map(int,input().split())
a=list(map(int,input().split()))
if h<=sum(a):
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
h, n = map(int, input().split())
a_list = list(map(int, input().split()))
t = 0
for a in a_list:
    t += a
if t >= h:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
h, n = map(int, input().split())
A = list(map(int, input().split()))

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

Submission status: Accepted

Solution code:
n,m=map(int,input().split())
l=list(map(int,input().split()))
d=sum(l)
if n>d:
    print("No")
else:
    print("Yes")

Submission status: Accepted

Solution code:
import sys

def ILI(): return list(map(int, sys.stdin.readline().rstrip().split()))
def ISI(): return map(int, sys.stdin.readline().rstrip().split())

h, n = ISI()
A = ILI()
if sum(A)<h:print("No")
else:print("Yes")

Submission status: Accepted

Solution code:
h,n=map(int,input().split())
a=list(map(int,input().split()))
result=0
for i in range(len(a)):
    result+=a[i]
if h<=result:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
h,n=map(int,input().split())
a=list(map(int,input().split()))
if h-sum(a)>0:
  print("No")
else:
  print("Yes")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
H,N = map(int,input().split())
A = list(map(int, input().split()))
if sum(A) >= H :
    print('Yes')
else :
    print('No')

Submission status: Accepted

Solution code:
H,N=map(int,input().split())
A=list(map(int,input().split()))
if sum(A) >= H:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
def resolve():
    h,n=map(int,input().split())
    a=list(map(int,input().split()))
    a.sort(reverse=True)
    if sum(a[:n])>=h:
        print("Yes")
    else:
        print("No")
resolve()

Submission status: Accepted

Solution code:
h, n = map(int,input().split())
a = list(map(int,input().split()))
print('Yes' if sum(a) >= h else 'No')

Submission status: Accepted

Solution code:
h,n = map(int, raw_input().split(' '))
moves = map(int, raw_input().split(' '))
if sum(moves) >= h:
	print 'Yes'
else:
	print 'No'

Submission status: Accepted

Solution code:
h,n=(int(x) for x in input().split())

a=[]

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

at_sum=0
for i in range(n):
	at_sum+=a[i]
	if h<=at_sum:
		print("Yes")
		break

if h>at_sum:
	print("No")

Submission status: Accepted

Solution code:
H,N = map(int,input().split())
A = map(int,input().split())

acc = 0
for a in A:
    acc += a

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

Submission status: Accepted

Solution code:
H, N = map(int, input().split())
As = list(map(int, input().split()))
s = sum(As)
if s >= H:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
h,n=map(int,input().split())
a=map(int,input().split())
s=0
for i in a:
    s+=i
if s>=h:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
h,n = map(int,input().split())
a = list(map(int,input().split()))
if sum(a)>=h:
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
h,n = map(int,input().split())
a = map(int, input().split())
print('Yes' if sum(a) >= h else 'No')

Submission status: Accepted

Solution code:
H, N = map(int, input().split())
A = list(map(int, input().split()))
ans = 'No'

for i in A:
    H -= i
    if H <= 0:
        ans = 'Yes'
        break

print(ans)

Submission status: Accepted

Solution code:
a=input().split(' ')
b=input().split(' ')
a[0]=int(a[0])
a[1]=int(a[1])
m=0
while m<a[1]:
    b[m]=int(b[m])
    a[0]=a[0]-b[m]
    if a[0]<=0:
        m=m+a[1]
        print('Yes')
    m=m+1
if a[0]>0:
    print('No')

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
H,N=map(int,input().split())
A=[int(x) for x in input().split()]
if H<=sum(A):
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
H, N = map(int, input().split())
A_list = list(map(int, input().split()))

sorted_A_list = sorted(A_list)
attack_A_list = sorted_A_list[:N]

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
h, n = map(int, input().split())
a = list(map(int, input().split()))
t = 0

for i in range(n):
    t += a[i]

if h > t:
    print("No")
else:
    print("Yes")

Submission status: Accepted

Solution code:
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 "No")

Submission status: Accepted

Solution code:
ni = lambda: int(input())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))

h,n = nm()
a = nl()

if h<=sum(a):
  print('Yes')
  exit()
print('No')

Submission status: Accepted

Solution code:
import sys
import math
from collections import deque
from collections import defaultdict

def main():
    h, n = list(map(int,sys.stdin.readline().split()))
    A = list(map(int,sys.stdin.readline().split()))
    print("Yes") if sum(A) >= h else print("No")
    return 0

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
H, N = map(int, input().split())
A = list(map(int, input().split()))
ans = 'No'
for i in A:
    H -= i
    if H <= 0:
        ans = 'Yes'
        break
print(ans)

Submission status: Accepted

Solution code:
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')

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
A=list(map(int,input().split()))
T=sum(A)
if a>T:
  print("No")
else:
  print("Yes")

Submission status: Accepted

Solution code:
h,n=map(int,input().split())
a=sum(list(map(int,input().split())))
if(h-a<=0):print("Yes")
else:print("No")

Submission status: Accepted

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

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

Submission status: Accepted

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

for i in range(N):
    H -= A[i]
if H <= 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
h, n = map(int, input().split())
a = map(int, input().split())
print("Yes" if h <= sum(a) else "No")

Submission status: Accepted

Solution code:
h,n=map(int,input().split())
lst=list(map(int,input().split()))
for i in range(n):
  h-=lst[i]
print("Yes" if h<=0 else "No")

Submission status: Accepted

Solution code:
h, n = map(int, input().split())
an = list(map(int, input().split()))

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

Submission status: Accepted

Solution code:
h,n = map(int,input().split())
a = list(map(int,input().split()))
suma = sum(a)
if(h<=suma):
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
import math 
import sys 
#t=int(sys.stdin.readline())
t=1
for _ in range(t):
    n,m=map(int,input().split())
    l=list(map(int,input().split()))
    if sum(l)>=n:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

Solution code:
h,n=map(int,input().split())
a=list(map(int,input().split()))
sum=0
for i in range(n):
    sum+=a[i]
print('Yes' if sum>=h else 'No')

Submission status: Accepted

Solution code:
h,n=map(int,input().split())
a=list(map(int,input().split()))
print('Yes' if sum(a)>=h else 'No')

Submission status: Accepted

Solution code:
h,n=map(int,input().split())
a=[0]*n
a[:]=map(int,input().split())
if sum(a)<h:
  print("No")
else:
  print("Yes")

Submission status: Accepted

Solution code:
h,n=map(int,input().split())
a=list(map(int,input().split()))
if sum(a)>=h:
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
import numpy as np
h, n = map(int, input().split())
a = np.array(list(map(int, input().split()))).sum()

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

Submission status: Accepted

Solution code:
h,n,*a = map(int,open(0).read().split())
print('YNeos'[h>sum(a)::2])

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
h,n = map(int,input().split())
a = list(map(int,input().split()))
for i in range(n):
    h = h - a[i]
if h > 0:
    print('No')
else:
    print('Yes')

Submission status: Accepted

Solution code:
import math
import time
from collections import defaultdict, deque
from sys import stdin, stdout
from bisect import bisect_left, bisect_right
n,k=map(int,stdin.readline().split())
a=list(map(int,stdin.readline().split()))
if(sum(a)>=n):
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

ans = "No"
for n in range(N):
    H -= A[n]
    if H <= 0:
        ans = "Yes"
        break
print(ans)

Submission status: Accepted

Solution code:
# ABC153B

def f(h, n, a):
    if sum(a) >= h:
        print('Yes')
    else:
        print('No')

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

Submission status: Accepted

Solution code:
h,n = map(int,input().split())
l = list(map(int,input().split()))
count = 0
for i in l:
    count += i
if count >= h:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline


def main():
    H, N = map(int, input().split())
    A = list(map(int, input().split()))
    assert N == len(A)
    print("Yes") if sum(A) >= H else print("No")


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
h,n = map(int, input().split())
a = list(map(int, input().split()))
print('Yes' if h<=sum(a)else'No')

Submission status: Accepted

Solution code:
H, N = [int(x) for x in input().split()]
A = [int(x) for x in input().split()]
if sum(A) >= H:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

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

Submission status: Accepted

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

if h - sum(a) <= 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import numpy as np
h, n = map(int, input().split())
a = list( map(int, input().split()) )
a = np.array(a)
if a.sum() < h:
    print("No")
else:
    print("Yes")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
h,n = (int(x) for x in input().split())

a = [int(x) for x in input().split()]

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


#print(sum(a))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
h, n = list(map(int, input().split()))
a = list(map(int, input().split()))
if sum(a) >= h:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
List=list(map(int,input().split()))
if a<=sum(List):
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:

h, n = list(map(int, input().split()))
A = list(map(int, input().split()))
total = sum(A)
if total >= h:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
H, N = map(int, input().split())
List = list(map(int, input().split()))
List.sort()
List.reverse()
#print(List)

i=0
while i<N:
    H-=List[0]
    del List[0]
    i+=1
    
if H<=0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
h, n = [int(_) for _ in input().split()]
a = [int(_) for _ in input().split()]
print('Yes' if sum(a) >= h else 'No')

Submission status: Accepted

Solution code:
H,N = map(int, input().split())
List = list(map(int,input().split()))
print("Yes" if sum(List) >= H else "No")

Submission status: Accepted

Solution code:
import sys
import math
import bisect

def main():
    m, n = map(int, input().split())
    A = list(map(int, input().split()))
    if sum(A) >= m:
        print('Yes')
    else:
        print('No')

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
h, n = map(int, input().split())
import numpy as np
a = np.array(list(map(int, input().split())))
if a.sum() >= h:
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
H, N = map(int, input().split(' '))
A = tuple(map(int, input().split(' ')))

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

Submission status: Accepted

Solution code:
H,N = map(int, input().split())
A = list(map(int, input().split()))
if sum(A) >= H:
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
H,N = map(int,input().split())
A = list(map(int,input().split()))
sumcheck = 0
for i in range(0, N):
    sumcheck += A[i]
if sumcheck >= H:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
H,N = map(int,input().split())
A = list(map(int,input().split()))
if sum(A)>=H:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
h, n = map(int, input().split())
lis = list(map(int, input().split()))

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
H,N=map(int,input().split())
A=list(map(int,input().split()))
if sum(A)>=H:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
import fileinput

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

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

Submission status: Accepted

Solution code:
h, n = map(int, input().split())
l = map(int, input().split())
for i in l:
  h=h-i
if h <= 0:
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
H,N=list(map(int,input().split()))
A=list(map(int,input().split()))
if H<=sum(A):
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
h, n = map(int, input().split())
A = list(map(int, input().split()))

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

Submission status: Accepted

Solution code:
H, N = map(int, input().split())
A_list = list(map(int, input().split()))
a_sum = sum(A_list)
if H - a_sum <= 0:
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline


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

    ans = "Yes" if H - sum(A) <= 0 else "No"
    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

s = sum(A)

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

Submission status: Accepted

Solution code:
import functools
H, N = list(map(int,input().split()))
A = list(map(int,input().split()))
sum = functools.reduce(lambda x,y: x+y,A)
if sum >= H:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

for i in range(n):
    h -= a[i]
    if h<=0:
        print('Yes')
        exit()
print('No')

Submission status: Accepted

Solution code:
array = []

for i in range(2):
    val = [int(s) for s in input().split()]
    array.append(val)

H = array[0][0]
A = array[1]

for i in A:
    H = H - i

if H <= 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

for i in range(len(a)):
	h -= a[i]
	
if h <= 0:
	print('Yes')
else:
	print('No')

Submission status: Accepted

Solution code:
h,n=map(int,input().split())
s=list(map(int,input().split()))
print("Yes" if sum(s)>=h else "No")

Submission status: Accepted

Solution code:
h,n = map(int,input().split())
a_ = list(map(int,input().split()))

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

Submission status: Accepted

Solution code:
M,N = list(map(int,input().split()))
s = list(map(int,input().split()))
 
if M <= sum(s):
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
h, n = list(map(int, input().split()))
a = list(map(int, input().split()))
if h > sum(a):
    print('No')
else:
    print('Yes')

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Fri May  8 15:17:01 2020

@author: shinba
"""

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

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

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

Submission status: Accepted

Solution code:
h,n = map(int,input().split())

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

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

Submission status: Accepted

Solution code:
# input
H, N = map(int, input().split())
A = list(map(int, input().split()))

for a in A:
    H -= a
    
    if H <= 0:
        break
        
if H <= 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
h,n=map(int,input().split())
a= list(map(int, input().split()))
attack=sum(a)
if attack>=h:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
from sys import stdin, setrecursionlimit


def main():
    h, n = map(int, stdin.readline().split())
    a = list(map(int, stdin.readline().split()))
    print('Yes') if sum(a) >= h else print('No')


if __name__ == "__main__":
    setrecursionlimit(10000)
    main()

Submission status: Accepted

Solution code:
h, n = map(int, input().split())
A = list(map(int, input().split()))
print("Yes" if sum(A) >= h else "No")

Submission status: Accepted

Solution code:
def main():
    h,n=map(int,input().split())
    a=sum(map(int,input().split()))
    print('Yes' if a>=h else 'No')
    
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
def solve():
    H, N = map(int,input().split())
    A = sum(map(int,input().split()))
    
    if H <= A:
        print("Yes")
    else:
        print("No")


if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
def solve():
    H, N = map(int,input().split())
    A = sum(list(map(int,input().split())))
    
    if H <= A:
        print("Yes")
    else:
        print("No")


if __name__ == '__main__':
    solve()

Submission status: Accepted

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

for i in range(0,N,1):
    H -= A[i]
    if H <= 0:
        print("Yes")
        exit()

print("No")

Submission status: Accepted

Solution code:

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

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
h, n = map(int, input().split())
a_list = list(map(int, input().split()))

for a in a_list:
    h -= a

if h <= 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
h,  k = map(int, input().split())
m = sum(map(int, input().split()))
print('Yes' if h <= m else 'No')

Submission status: Accepted

Solution code:
H,N = map(int,input().split())
sumA=sum(map(int,input().split()))
if sumA >= H:
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
import math

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

for i in range(len(A)):
  H -= A[i]
  if H <= 0:
    print('Yes')
    break
else:
  print('No')

Submission status: Accepted

Solution code:
h,n=map(int,input().split())
LIST=list(map(int,input().split()))
print("Yes" if h<=sum(LIST) else "No")

Submission status: Accepted

Solution code:
h,n = map(int,input().split())
a_sum = sum(list(map(int,input().split())))
print(['No','Yes'][a_sum >= h])

Submission status: Accepted

Solution code:
il1 = [int(k) for k in input().split()]
A = [int(k) for k in input().split()]
H = il1[0]
N = il1[1]

tmp = H
for a in A:
    H = H - a

if H <= 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
h, n = map(int, input().split())
A = list(map(int, input().split()))
print('Yes' if sum(A)>=h else 'No')

Submission status: Accepted

Solution code:
# B - Common Raccoon vs Monster

H, N = map(int, input().split())
A = [int(a) for a in input().split()]

for a in A:
    H -= a

print('Yes' if H <= 0 else 'No')

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop
from itertools import permutations, accumulate
from math import sqrt, ceil, floor, factorial
from bisect import bisect_left, bisect_right
from copy import deepcopy
from operator import itemgetter
from fractions import gcd
import sys
def I(): return int(input())  # '123' -> 123
def Is(): return map(int, input().split())  # '123 456' -> 123, 456
def LI(): return list(map(int, input().split()))  # '123 456' -> [123, 456]
def TI(): return tuple(map(int, input().split()))  # '123 456' -> (123, 456)
def IR(n): return [I() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def TIR(n): return [TI() for _ in range(n)]
def S(): return input()
def Ss(): return input().split()  # 'aa bb' -> 'aa','bb' or ['aa','bb']
def LS(): return list(input())  # 'abc123' -> ['a','b','c','1','2','3']
def SR(n): return [S() for _ in range(n)]
def SsR(n): return [Ss() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
sys.setrecursionlimit(1000000)
MOD = 1000000007
INF = float('inf')

h, n = Is()
A = LI()
if sum(A) >= h:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
H, N = map(int, input().split())
l = list(map(int, input().split()))

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

Submission status: Accepted

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

for i in range(N):
  H = H - A[i]

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

else :
  print("No")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
h,n=map(int,input().split())
a=list(map(int, input().split()))
print('Yes' if h<=sum(a) else ('No'))

Submission status: Accepted

Solution code:
H,N=map(int,input().split())
A=[int(s) for s in input().split()]

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

Submission status: Accepted

Solution code:
h, n = map(int, input().split())
a_list = list(map(int, input().split()))

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

Submission status: Accepted

Solution code:
h, n = map(int, input().split())
a = list(map(int, input().split()))
if sum(a) >= h:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

x = sum(A)

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

Submission status: Accepted

Solution code:
H, N = map(int, input().split())

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

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

Submission status: Accepted

Solution code:
h,n=map(int,input().split())
A=sum(list(map(int,input().split())))
if A>=h:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
h, n = map(int, input().split())
a = list(map(int, input().split()))
print("Yes" if h <= sum(a) else "No")

Submission status: Accepted

Solution code:
h, n = map(int, input().split())
ar = list(map(int, input().split()))
if sum(ar) >= h:
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
h,n = map(int,input().split())
a = list(map(int,input().split()))
print(["No","Yes"][sum(a) >= h])

Submission status: Accepted

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

print(["No","Yes"][sum(a) >= h])

Submission status: Accepted

Solution code:
h, n = map(int, input().split())
a = sum(list(map(int, input().split())))
print("Yes") if a >= h else print("No")

Submission status: Accepted

Solution code:
h, n = map(int, input().split())
As = list(map(int, input().split()))

sum = 0
for i in range(len(As)):
    sum += As[i]

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

Submission status: Accepted

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

for i in a:
    h-=i
if h>0:
    print("No")
else:
    print("Yes")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
h,n = map(int,input().split())
A = map(int,input().split())

c = 0
for x in A:
    c+=x

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

Submission status: Accepted

Solution code:
h, n = map(int, input().split())
a = list(map(int, input().split()))
s = sum(a)
print ("Yes") if s >= h else print ("No")

Submission status: Accepted

Solution code:
h, n = map(int, input().split())
a = [int(i) for i in input().split()]
if sum(a) >= h:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
H,N=map(int,input().split())
L=list(map(int,input().split()))
a=sum(L)
if H>a:
  print('No')
else:
  print('Yes')

Submission status: Accepted

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

sum = 0
for i in A :
   sum = sum + i

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

Submission status: Accepted

Solution code:
h,n=map(int,input().split())
a=list(map(int,input().split()))
print("Yes" if h<=sum(a) else "No")

Submission status: Accepted

Solution code:
#!/usr/bin/env python
import sys
from collections import Counter
from itertools import permutations, combinations
from fractions import gcd
#from math import gcd
from math import ceil, floor
import bisect
sys.setrecursionlimit(10 ** 6)
inf = float("inf")

def input():
    return sys.stdin.readline()[:-1]

def main():
    h, n = map(int, input().split())
    a = list(map(int, input().split()))
    print("Yes") if sum(a) >= h else print("No")

if __name__ == '__main__':
    main()