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


if __name__ == '__main__':
    main()

Submission status: Accepted

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


main()

Submission status: Accepted

Solution code:
import numpy as np

ene=list(map(int, input().split()))
num=list(map(int, input().split()))

if ene[0]>np.array(num).sum():
    print("No")
else:
    print("Yes")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
HN= input().split()
H= int(HN[0])
N= int(HN[1])
move=input().split()
dam=0
flag=False
for i in range (N):
    dam= dam+int(move[i])
    if (dam>=H):
        flag=True
        break
    else:
        flag=False
    
if (flag==True):
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
readline = input().split()
attacks = input().split()
hp = int(readline[0])
attacksum = 0
for i in range (len(attacks)):
    attacksum += int(attacks[i])

if (attacksum >= hp):
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

x=0

for i in range(N):
    x=x+A[i]

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

Submission status: Accepted

Solution code:
import sys

x = sys.stdin.readline()
x = x.split(' ')
(h,n)=[int(str) for str in x]
x = sys.stdin.readline()
x = x.split(' ')

sum = 0
for i in x:
  sum += int(i)

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

sys.stdout.flush()

Submission status: Accepted

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

tmp = list(input().split())
sum = 0

for i in range (N) :
    sum += int(tmp[i])

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

Submission status: Accepted

Solution code:
h, n = list (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()))
a = sum(A)
print("Yes" if a >= H else "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 < 1:
        print('Yes')
        exit()
print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# 初期入力
H,N = (int(x) for x in input().split(" "))
A = list(map(int, input().split()))

# 攻撃力の和がHと比較して、大きければ勝てる可能性あり
if H <= sum(A):
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

h, n = map(int, input().split())
A = list(map(int, input().split()))
a_sum = sum(A)

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 H<=sum(A) else 'No')

Submission status: Accepted

Solution code:
import math
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:
import numpy as np


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

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

Submission status: Accepted

Solution code:
#ABC153.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:
hp, attack_count = map(int, input().split())
attack_list = list(map(int, input().split()))
full_damage = sum(attack_list)

if hp > full_damage:
    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 range(n):
	sum = sum + a[i]
if sum >= h :
	print("Yes")
else:
	print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(n):
    h -= li[i]
    
if h <= 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
x = [int(x) for x in input().split()]
line = [int(x) for x in input().split()]

if sum(line) >= x[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:
H, N = map(int, input().split())
A = list(map(int, input().split()))

total = sum(A)

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def s0():
    a=input().split()
    (n,m)=map(int,a)
    b=input().split()
    b1=list(map(int,b))
    d=sum(b1)
    if d>=n:
        return 'Yes'
    else:
        return 'No'


print(s0())

Submission status: Accepted

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

if h > sum(c):
    print("No")
elif h <= sum(c):
    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 = sum(map(int, input().split()))
print('Yes' if h <= A else 'No')

Submission status: Accepted

Solution code:
hn = input().split()
aa = input().split()

h = int(hn[0])

for i in range(len(aa)):
	h = h - int(aa[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()]

attack=0
for i in range(len(a)):
  attack=attack+a[i]

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

Submission status: Accepted

Solution code:
'''
    Auther: ghoshashis545 Ashis Ghosh
    College: jalpaiguri Govt Enggineerin College
    Date:23/03/2020
'''


from math import ceil
def main():
    
    
    
    n,m=map(int,input().split())
    
    a=list(map(int,input().split()))
    s=sum(a)
    if(n<=s):
        print('Yes')
    else:
        print('No')
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
if __name__ =="__main__":
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

if sum(As) >= 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 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:
hn=input().rstrip().split(" ")
h=int(hn[0])
n=int(hn[1])
skills=input().rstrip().split(" ")
sums=0
for skill in skills:
    sums=sums+int(skill)
if h<=sums:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
h, n = map(int, input().split())
a = sum(list(map(int, input().split())))
print("Yes") if h<=a 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()))

at=sum(a)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
H,N,*A=map(int,open(0).read().split())
print("Yes" if sum(A)>=H else "No")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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


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

Submission status: Accepted

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

if MAX < H:
  print("No")
else:
  print("Yes")

Submission status: Accepted

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

waza = input().split()
damage = 0

for i in range(n):
  damage += int(waza[i])

if damage >= h:
  ans = "Yes"
else:
  ans = "No"

print(ans)

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):
    print('Yes')

else:
    print('No')

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
#153_B
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 sum(a) >= h:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

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

Submission status: Accepted

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

if h <= sum(a_lst):
  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()))

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 = 0
for i in range(n):
    sum += a[i]

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

Submission status: Accepted

Solution code:
h,n=map(int,input().split())
a=sorted(list(map(int,input().split())),reverse=True)
x=len(a)

if x<=n:
    if sum(a)>=h:
        print('Yes')
    else:
        print('No')
else:
    a=a[:x-n+1]
    if sum(a)>=h:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# Problem B - Common Raccoon vs Monster

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

# initialization
a_sum = sum(a_list)

# output
if h - a_sum<=0:
    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)
print('Yes' if h<=x else '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())
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()))

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

Submission status: Accepted

Solution code:
# printデバッグ用
import sys
argVec = sys.argv
if len(argVec) > 1:
    GBN_DEBUG = True
else:
    GBN_DEBUG = False

def dprn(s, i):
    if GBN_DEBUG:
        print(", " + s + " = " + str(i), end = "")

def dprns(s):
    if GBN_DEBUG:
        print(", " + s, end = "")

def dprni(i):
    if GBN_DEBUG:
        print(str(i), end=" ")

#S = input()
#N = int(input())
#S, T = input().split() 
H, N = map(int, input().split()) 
#W = [input() for _ in range(N)]
A = list(map(int, input().split()))

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
h, n = map(int,input().split())
a = [int(i) for i in input().split()]

if h - sum(a) <= 0:
    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("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 = [int(x) for x in input().split()]

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, acos, atan, asin
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
def input(): return sys.stdin.readline().strip()
def STR(): return input()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))
sys.setrecursionlimit(10 ** 9)
inf = sys.maxsize
mod = 10 ** 9 + 7

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

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
H,N = map(int,input().split())
A = list(map(int, input().split()))
#print(H,N)
#print(A)
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=[int(i) for i in input().split()]
print("Yes" if H<=sum(A) else "No")

Submission status: Accepted

Solution code:
H,N = map(int,input().split())
A = [int(i) for i in input().split()]
j = 0
for a in A:
  j += a
if j >= 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 i in range(n):
    sum +=a[i]
if(h <= sum):
    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 = map(int, input().split())
sumA = sum(A)

if H - sumA <= 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(n):
    sum += a[i]
if h>sum:
    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 a_list:
    h = h - i
if h <= 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

count = 0
for num in a_list:
  count += num

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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 h <= sum(a):
    print('Yes')
else :
    print('No')

Submission status: Accepted

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

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): 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 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:
from decimal import Decimal
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('No')
else:
    print('Yes')

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-

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

sum_a = 0
for a in a_list:
    sum_a += a
if h <= sum_a:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces

h, n = na()
a = na()
if sum(a) >= h:
    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:
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:
#!/usr/bin/env python3
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 h > sum(a):
	print('No')
else:
	print('Yes')

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

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,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:
import sys
input = sys.stdin.readline

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

Submission status: Accepted

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

Submission status: Accepted

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

aintlist = input().split(" ")
alist=[]
for i in range(n):
    alist.append(int(aintlist[i]))

max = 0
for i in range(n):
    max = max + alist[i]

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:

def main():
    
    h,n = map(int, input().split())

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

    if sum(a_list) >= h:
        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 sum(a) < h:
    print('No')
else:
    print('Yes')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

ans = "No"
sumA = 0
for a in A:
  sumA += a
  if sumA >= H:
    ans = "Yes"
    break
  
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
sys.setrecursionlimit(10000000)
INF = 1<<32

YES = "Yes"  # type: str
NO = "No"  # type: str

def solve(H: int, N: int, A: "List[int]"):
    if H <= sum(A):
        print(YES)
    else:
        print(NO)
    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    H = int(next(tokens))  # type: int
    N = int(next(tokens))  # type: int
    A = [int(next(tokens)) for _ in range(N)]  # type: "List[int]"
    solve(H, N, A)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
h, n = map(int, input().split())
a = list(map(int, input().split()))
sum_a = sum(a)
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 = 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()))
all=int(0)
for i in range(n):
    all+=A[i]
if h<=all:
    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()))

mysum = sum(a)

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

Submission status: Accepted

Solution code:
h,n=map(int,input().split())
print('Yes' if sum(list(map(int,input().split())))>=h else '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())
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())
techniques = list(map(int, input().split()))
techniques.sort(reverse=True)
if sum(techniques[:n]) >= 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:
# import math
# import bisect
# import heapq
# from collections import deque
# import numpy as np

h,n = map(int, input().split())
# n = int(input())
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 = 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("No")
else:
  print("Yes")

Submission status: Accepted

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

a_sum = 0
for a_i in sorted(a, reverse=True):
    a_sum += a_i
    if a_sum >= h:
        print('Yes')
        break
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
h,n=map(int,input().split())
A=list(map(int,input().split()))
for a in A:
    h=h-a
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()))

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

Submission status: Accepted

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