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:
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:
import math
H,N = map(int,input().split())
A = [int(x) for x in input().split()]

count = 0
sum2 = []
'''for i in range(2 ** N):
        sum1 = []
        for j in range(len(A)):
            if ( i >> j) & 1 == 1:
                sum1.append(A[j])
        if sum(sum1) == H:
            count = 1
            print("Yes")
            break
'''
if sum(A) >= H:
    print("Yes")

else:
    print("No")

Submission status: Accepted

Solution code:
# ABC 153 B

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())) 
 
for i in range(N):
    H -= A[i]
 
if H <= 0 :
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
_input = input().split()

hp = int(_input[0])
n = int(_input[1])

_input_attack = input().split()

check = 0
for i in range(n):
  check += int(_input_attack[i])
  
if hp <= check:
  print('Yes')
else:
  print('No')

Submission status: Accepted

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

result=""
i=0

for i in range(N):
    H-=InpList[i]
    
if H>0:
    result="No"
else:
    result="Yes"

print(result)

Submission status: Accepted

Solution code:

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

sumA = 0

for n in range(N):
    sumA = sumA + A[n-1]

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
h,n=input().split()
hh=int(h)
nn=int(n)
s=0

a = list(map(int, input().split()))
for i in a:
    s=s+i

if hh <= s:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
HN=input().split()
H = int(HN[0])
N = int(HN[1])

AA = input().split()

totalA = 0
for i in range(N):
  totalA += int(AA[i])

result = ""
if H <= totalA:
  result = "Yes"
else:
  result = "No"

print(result)

Submission status: Accepted

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

#print('H=', H, 'N=', N)
#print('A=', A)

#for i in range(N):
#  n = A.index(max(A))
#  print('n=', n)
#  H = H - max(A)
#  A.remove(A[n])
#  print('A=', A)

T = sum(A)
H = H - T


if H <= 0:
  print('Yes')
if H > 0:
  print('No')

Submission status: Accepted

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

atc = 0

for n in range(N):
    atc += A[n]

if atc >= 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)

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = list(map(int,input().split()))
b = list(map(int,input().split()))
c = 0
for i in range(a[1]):
	c += b[i]
if a[0] <= c:
	print("Yes")
else:
	print("No")

Submission status: Accepted

Solution code:
import os
import sys

def main():
    H , A = map(int , input().split())
    list = [s for s in input().split()]
    c = sum(int(i) for i in list)
    if c >= H :
        print ('Yes')
    else :
        print ('No')
    #print (str(X))

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
input_list = list(map(int, input().split()))
hp = input_list[0]
arts = input_list[1]
arts_list = list(map(int, input().split()))
if hp <= sum(arts_list):
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

if(H <= sum(aa)):
	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=map(int,input().split())
l=list(map(int,input().split()))
s=sum(l)
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 = [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 = [int(i) for i in input().split()]

t = 0

for i in A:
    t += i

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

Submission status: Accepted

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

a_list = [int(x) for x in input().split()]
  
if h <= sum((a_list)):
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
h,m = map(int, input().split())
atack = list(map(int, input().split()))

atack.sort(reverse=True) #降順に並び替え
atack_select = atack[:m]

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

Submission status: Accepted

Solution code:

def abc153_b():
    H,N=map(int,input().split())
    A=list(map(int,input().split()))
    attack=0
    for a in A:
        if attack>=H:
            print("Yes")
            return
        else:
            attack+=a
    if attack >= H:
        print("Yes")
        return
    else:
        print("No")
        return
        
abc153_b()

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:
# coding: utf-8
HP_variation = list(map(int,input().split()))
skill_damage = list(map(int,input().split()))

if HP_variation[0] <= sum(skill_damage):
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

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

Submission status: Accepted

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

list.sort(A, reverse=True)

for i in range(N):
    para = para - A[i]
    if para <= 0 :
        print('Yes')
        break
    elif i ==N - 1  and para > 0:
         print('No')

Submission status: Accepted

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

if sum(int(i) for i in A) >= H:
    print("Yes")
else:print("No")

Submission status: Accepted

Solution code:
def main():
    h, _ = map(int, input().split())
    specials = list(map(int, input().split()))

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = list(map(int,input().split())) 
n1 = list(map(int,input().split())) 
if sum(n1) >= n[0] : 
    print('Yes') 
else : 
    print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
H, N = map(int, input().split())
A = list(map(int, input().split()))
l = len(A)
q = 0
'''
print(A)
print(l)
'''
for damage in A:
  q = q+damage

if q >= 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(0, N):
    H = H - A[i]
    if H < 0:
        break

if H > 0: 
    print('No')
else:
    print('Yes')

Submission status: Accepted

Solution code:
#体力と必殺技
prm = input().split()
hp = int(prm[0])
ult = int(prm[1])

#各必殺技のダメージ
dmg = input().split()
alldmg = 0

for cdmg in dmg:
    alldmg += int(cdmg)

if alldmg >= hp:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
h, n = [int(v) for v in input().split()]
a = [int(v) for v in input().split()]

for v in a:
    h -= v
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()))

A_sorted = sorted(A, reverse=True)


for attack in A_sorted:
	if N == 0:
		break
	H = H - attack
	N = N - 1

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

Submission status: Accepted

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

Submission status: Accepted

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

A_list = [N]
A_list = input().split()

for i in range(N):
    H = H - int(A_list[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(" ")))
atk = 0
for i in A:
    atk += i
if atk >= H:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = input()
l = a.split()
h = int(l[0])
n = int(l[1])
b = input()
ll = b.split()
for i in range(0,n):
    ll[i] = int(ll[i])

sum = sum(ll)
if h<sum+1:
    print("Yes")
else:
    print("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:
hs= input().split()
h = int(hs[0])
s = int(hs[1])
skill = input().split()
total_skill = 0
for i in range(s):
  total_skill = total_skill + int(skill[i])
if(h <= total_skill):
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
import math

a,b = map(int, input().split())
l = input().split()
sum = 0
for i in range(b):
  sum = sum + int(l[i])
if a > sum:
  print('No')
else:
  print('Yes')

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

tmp = sum(A)
tmp = H-tmp

if tmp <=0:
    ans = 'Yes'
else:
    ans = 'No'
print(ans)

Submission status: Accepted

Solution code:

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

Submission status: Accepted

Solution code:
a,n=(int(x) for x in input().split())
p = list(map(int, input().split()))

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

Submission status: Accepted

Solution code:
H, N = input().split()
H = int(H)
N = int(N)
A= input().split()
total=0
for i in A:
    total += int(i)
if total >= H:
    print("Yes")
elif total < H:
    print("No")

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
H,N =(float(x) for x in input().split())
list1 = [float(s) for s in input().split()] 

i=0
Sum=0
while i<N:
 Sum=Sum+list1[i]
 i=i+1

if Sum<H:
  print("No")

else:
  print("Yes")

Submission status: Accepted

Solution code:
x, y = list(map(int, input().strip().split(' ')))
a = list(map(int, input().strip().split(' ')))
class health:
  def __init__(self, x, y, a):
    self.x = x
    self.y = y
    self.a = a
  def decrease_health(self, i):
    self.x = self.x-self.a[i]
monster = health(x, y, a)
for i in range(len(a)):
  monster.decrease_health(i)
if(monster.x <= 0): 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(s>=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("No")
else:
    print("Yes")

Submission status: Accepted

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

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:
s = input().split()
H = int(s[0])
N = int(s[1])

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

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

Submission status: Accepted

Solution code:
h,n=(int(x) for x in input().split())
#print(h)
la = list(map(int, input().split()))
sa = sum(la)
#print(sa)
if h <= sa:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
# coding: utf-8

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:
#!/usr/bin/env python3

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()))
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()))
sum = sum(a)
if sum >= H:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

H,N,*A = map(int,read().split())

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

Submission status: Accepted

Solution code:
H,N = map(int,input().split())
A = input().split()
for i in range(N):
    H = H - int(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()))

s = 0
for i in a:
    s += i

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

Submission status: Accepted

Solution code:
H, W = 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())
c = input().split()

sum = 0
for number in c:
    sum += int(number)

if sum >= H:
    res = "Yes"
else:
    res = "No"

print(res)

Submission status: Accepted

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

Total = 0
for i in range(len(A)):
       Total += A[i]
if  H > Total :
       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 = list(map(int, input().split()))
A = list(map(int, input().split()))
for i in range(H[1]):
    H[0]= H[0] -A[i]
if H[0] <= 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

a.sort(reverse=True)
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()))

sum = 0

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

ans = "No"

if(sum(A) >= M[0]):
    ans = "Yes"

print(ans)

Submission status: Accepted

Solution code:
i = list(map(int,input().split()))
i2 = list(map(int,input().split()))

if sum(i2) >= i[0]:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:


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

    flag = False

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






if __name__ == "__main__":
    main()

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

Submission status: Accepted

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

A.sort()
#print(A)

MOVES = len(A)
NUM = MOVES
#print(MOVES)

count = 0
flag = 0

while(MOVES > 0):
  H -= A[MOVES-1]
  MOVES -= 1
  if(H < 1):
    print('Yes')
    flag = 1
    break

if(flag == 0):
  print('No')

Submission status: Accepted

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

for val in range(N):
    A_total += int( list_A[val] )
if A_total >= H:
    print ("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
l=list(map(int,input().split()))
if(sum(l)>=a):
    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 S >= H:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
##B
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:
import math
a, b = map(int, input().split()) 
A = sorted(map(int, input().split())) 


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

Submission status: Accepted

Solution code:
import sys
import math
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines

h, n,*a = map(int,read().split())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np

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

x = np.array(list(map(int, input().split())))

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

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
x = list(map(int, input().split()))
i = 0
x_sum = 0
while b > i:
    x_sum += x[i]
    i += 1
a -= x_sum
if a <= 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
import numpy as np
H, N = map(int,input().split())
A = np.array([int(e) for e in input().split()])
if( H <= A.sum()):
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:

import itertools

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

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

Submission status: Accepted

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

sum = 0
ans = None

for a in A:
    sum = sum + a
    if H < a:
        ans = "Yes"
        break
if H > sum and ans == None:
    ans = "No"
else:
    ans = "Yes"

print(ans)

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
x = input().split()
h = int(x[0])
n = int(x[1])

a = input().split()
a = [int(i) for i in a]
a.sort(reverse=True)

w = False
for i in range(n):
  h -= a[i]
  if 0 >= h:
    w = True
    break

print('Yes') if	True ==	w else print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
INPUT =list(map(int, input().split()))

H = INPUT[0]
N = INPUT[1]

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

list_sum = sum(hists)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def run():
  H, N = map(int, input().split())
  A_sum = sum(map(int, input().split()))
  if H-A_sum > 0:
    print('No')
  else:
    print('Yes')
  
if __name__ == '__main__':
  run()

Submission status: Accepted

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

Submission status: Accepted

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

cnt = 0
for a in A:
  H -= a
  cnt += 1
  if H > 0 and cnt == N:
    print("No")
    break
  elif H <= 0:
    print("Yes")
    break

Submission status: Accepted

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

for i in range(0,int(n)):
    h = int(h) - int(w[i])

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

Submission status: Accepted

Solution code:
# Enter your code here. Read input from STDIN. Print output to STDOUT

import numpy as np
from sys import stdin


def get_result(data):
    H, N = data[0]
    A = sorted(data[1])
    return 'No' if sum(A[:N]) < H else 'Yes'

if __name__ == '__main__':
    raw_data = [val.rstrip('\n') for val in stdin.readlines()]
    data = [list(map(int, val.split(' '))) for val in raw_data]
    result = get_result(data)
    print(result)

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 = input().split()

At = 0
for i in range(N):
  At += int(A[i])
  
if At >= H:
  print('Yes')
else:
  print('No')

Submission status: Accepted

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

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

if cnt <= 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
s = input().split()
h, n = int(s[0]), int(s[1])

ss = input().split()
ans = [int(i) for i in ss]

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

Submission status: Accepted

Solution code:
x = input().split()
H = int(x[0])
N = int(x[1])
A = input().split()
A = [int(l) for l in A]
T = "No"
for i in range(N):
    H = H - A[i]
    if H <= 0:
        T = "Yes"
        break
print(T)

Submission status: Accepted

Solution code:
HN = input().split()
H = int(HN[0])
N = int(HN[1])

A = input().split()
sum_A = 0
for i in range(N):
  sum_A += int(A[i])

if H > sum_A:
  print('No')
else:
  print('Yes')

Submission status: Accepted

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

sum=0

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

for A in ln:
  sum+=A

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
H,N = map(int,input().split())
Attacks = [_ for _ in map(int,input().split())]
if sum(Attacks) < H:
    print('No')
    sys.exit(0)
if sum(Attacks) >= H:
    print('Yes')
    sys.exit(0)

Submission status: Accepted

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

Submission status: Accepted

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

arr = sorted(arr,reverse=True)
total = sum(arr[:n])

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

Submission status: Accepted

Solution code:
import math

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

max = 0
for i in hissa:
    max = i + max

if max >= H:
    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 n in range(N):
  sum = sum + A[n]

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

Submission status: Accepted

Solution code:
buf = input().split(" ")
H=int(buf[0])
N=int(buf[1])
 
A = list(map(int, input().split())) 
 
A=sorted(A, reverse=True)
 
for i in range(N):
  if H<=0:
    break
  H=H-A[i]
 
if H<=0:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
i = list(map(int, input().split()))
j = list(map(int, input().split()))
if i[0]<=sum(j):
  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:
hp_list = [int(i) for i in input().split()]
attack_list = [int(v) for v in input().split()]

if hp_list[0] <= sum(attack_list):
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
H,N=map(int,input().split())
A=[int(i) for i in 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(map(int,input().split()))
if sum(A)<h:
    print('No')
    
else:
    summ=0
    for i in A:
        h-=i
        if h<=0:
            print('Yes')
            break
    if h>0:
        print('No')

Submission status: Accepted

Solution code:
h, n = map(int, input().split())
al = list(map(int, input().split()))
al_s = sorted(al, reverse=True)

count = 0
for a in al_s:
    h -= a

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

Submission status: Accepted

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

Submission status: Accepted

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

suma=sum(a)

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

Submission status: Accepted

Solution code:
H, N = map(int, input().rstrip().split())
total = 0
a = list(map(int, input().split()))
for i in a:
    total += i

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

Submission status: Accepted

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

for i in range(n):
  a=a+m[i]
  
if h-a>0:
  print("No")
else:
  print("Yes")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
h, n = map(int, input().split())
a_list = [int(i) for i in input().split()]

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