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:
H, N = map(int, input().split())
List = list(map(int, input().split()))
if H<=sum(List):
    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)):
    print('No')
else:
    print('Yes')

Submission status: Accepted

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

all = sum(aa)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
H,N = map(int,input().split())
A = list(map(int,input().split()))
def battle(a,n):
  ans = 0
  for i in range(n):
    ans += a[i]
  return ans
    
if H <= battle(A,N):
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
h, n = map(int, input().split())
cmdsum = sum(list(map(int, input().split())))
if cmdsum < 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())
print('Yes' if sum(map(int, input().split()))>=H else 'No' )

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
H, N = map(int, input().split())
data = [int(i) for i in input().split()]
DATA = sorted(data, reverse=True)
count = 0
 
for i in range(N):
  H = H - DATA[i]
  if H <= 0:
    print("Yes")
    sys.exit()
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())
number = list(map(int,input().split()))
if sum(number)<H:
    print("No")
else:
    print("Yes")

Submission status: Accepted

Solution code:
# 153 B

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

for i in a:
    sum += i

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**7) #再帰関数の上限,10**5以上の場合python
import math
from copy import copy, deepcopy
from copy import deepcopy as dcp
from operator import itemgetter
from bisect import bisect_left, bisect, bisect_right#2分探索
#bisect_left(l,x), bisect(l,x)#aはソート済みである必要あり。aの中からx未満の要素数を返す。rightだと以下
from collections import deque
#deque(l), pop(), append(x), popleft(), appendleft(x)
##listでqueの代用をするとO(N)の計算量がかかってしまうので注意
from collections import Counter#文字列を個数カウント辞書に、
#S=Counter(l),S.most_common(x),S.keys(),S.values(),S.items()
from itertools import accumulate,combinations,permutations#累積和
#list(accumulate(l))
from heapq import heapify,heappop,heappush
#heapify(q),heappush(q,a),heappop(q) #q=heapify(q)としないこと、返り値はNone
#import fractions#古いatcoderコンテストの場合GCDなどはここからimportする
from functools import lru_cache#pypyでもうごく
#@lru_cache(maxsize = None)#maxsizeは保存するデータ数の最大値、2**nが最も高効率
from decimal import Decimal

def input(): 
    x=sys.stdin.readline()
    return x[:-1] if x[-1]=="\n" else x
def printl(li): _=print(*li, sep="\n") if li else None
def argsort(s, return_sorted=False): 
    inds=sorted(range(len(s)), key=lambda k: s[k])
    if return_sorted: return inds, [s[i] for i in inds]
    return inds
def alp2num(c,cap=False): return ord(c)-97 if not cap else ord(c)-65
def num2alp(i,cap=False): return chr(i+97) if not cap else chr(i+65)
def matmat(A,B):
    K,N,M=len(B),len(A),len(B[0])
    return [[sum([(A[i][k]*B[k][j]) for k in range(K)]) for j in range(M)] for i in range(N)]
def matvec(M,v):
    N,size=len(v),len(M)
    return [sum([M[i][j]*v[j] for j in range(N)]) for i in range(size)]
def T(M):
    n,m=len(M),len(M[0])
    return [[M[j][i] for j in range(n)] for i in range(m)]
def main():
    mod = 1000000007
    #w.sort(key=itemgetter(1),reversed=True)  #二個目の要素で降順並び替え

    #N = int(input())
    H,N = map(int, input().split())
    A = tuple(map(int, input().split())) #1行ベクトル
    #L = tuple(int(input()) for i in range(N)) #改行ベクトル
    #S = tuple(tuple(map(int, input().split())) for i in range(N)) #改行行列

    if sum(A)>=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 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) <= 0 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 = list(map(int, input().split()))
attacks = list(map(int, input().split()))
if sum(attacks) >= 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())
sum = 0
for i in list(map(int, input().split())):
    sum += 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()))

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()))
a.sort(reverse=True)
for v in a:
  h -= v
  if h <= 0:
    print('Yes')
    break
else:
  print('No')

Submission status: Accepted

Solution code:
H,N=map(int,input().split())
A=list(map(int,input().split()))
a=sorted(A,reverse=True)
for i in a:
  H-=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()))
if h-sum(a) <= 0:
    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 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:
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 sum(A_list) >= 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_list) >= H else "No   ")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def solve():
    h, n = map(int, input().split())
    a = map(int, input().split())
    for i in a:
        h -= i
    print('YNeos'[h>0::2])


if __name__ == '__main__':
    solve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
h, n = map(int, input().split())
lis = [int(x) for x in input().split()]
if sum(lis) >= 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 s >= h:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
H, N = map(int, input().split())
A = list(map(int, input().split()))
A.sort()
A = A[:N]
s = sum(A)
ans = 'No'
if s >= H:
  ans = 'Yes'
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
h,n = map(int,input().split())
L = list(map(int,input().split()))
L.sort(reverse = True)
cnt = 0
for i in range(n):
    cnt  += L[i]
    if cnt >= h:
        print("Yes")
        exit()
print("No")

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10 ** 7)
input = sys.stdin.readline
f_inf = float('inf')
mod = 10 ** 9 + 7


def resolve():
    h, n = map(int, input().split())
    A = list(map(int, input().split()))

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


if __name__ == '__main__':
    resolve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# Problem B - Common Raccoon vs Monster

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

# initialization
a_sum = sum(a_nums)

# output
if a_sum>=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:
import math
import string
import collections
from collections import Counter
from collections import deque
from decimal import Decimal
import sys
import fractions


def readints():
    return list(map(int, input().split()))


def nCr(n, r):
    return math.factorial(n)//(math.factorial(n-r)*math.factorial(r))


def has_duplicates2(seq):
    seen = []
    for item in seq:
        if not(item in seen):
            seen.append(item)
    return len(seq) != len(seen)


def divisor(n):
    divisor = []
    for i in range(1, n+1):
        if n % i == 0:
            divisor.append(i)
    return divisor


# coordinates
dx = [-1, -1, -1, 0, 0, 1, 1, 1]
dy = [-1, 0, 1, -1, 1, -1, 0, 1]
h, n = map(int, input().split())

a = readints()
sum_x = 0
for i in range(n):
    sum_x += a[i]
if sum_x >= h:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
H,N = map(int,input().split())
A = list(map(int,input().split()))
tot = sum(A)
if tot>=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 sum(A)>=h else "No")

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
from collections import *

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:
H,N=map(int,input().split())
atk = sum(map(int,input().split()))
if atk>=H:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
a,b = [int(x) for x in input().split()]
arr = [int(x) for x in input().split()]

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

Submission status: Accepted

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

print("Yes" if sum(A_list) >= H else "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('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 sum(a) >= h 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')
        exit(0)

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=list(map(int,input().split()))
if sum(a)>=H:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
n,m = map(int,input().split())
li=list(map(int,input().split()))
if n>sum(li):
    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:
#<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
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 math

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

Submission status: Accepted

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

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

ans='No'

if h<=sum(m): ans='Yes'

print(ans)

Submission status: Accepted

Solution code:
#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:
def main():
    h, n = map(int, input().split())
    inlis = list(map(int, input().split()))

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


    
if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
mod = 1e9+7
def add(a, b):
    c = a + b
    if c >= mod:
        c -= mod
    return c

def main():
    H, N = [int(x) for x in raw_input().split()]
    
    s = sum([int(x) for x in raw_input().split()])
    
    if s >= H:
        print('Yes')
    else:
        print('No')
    
    

main()

Submission status: Accepted

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

Submission status: Accepted

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

h,n = map(int,input().split())
L=list(map(int,input().split()))
for i in range(n):
    h-=L[i]
    if h<=0:
        print('Yes')
        break
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(map(int, input().split()))

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

Submission status: Accepted

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

if H <= sum(waza):
    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 = [int(i) for i in input().split()]
print("No" if sum(a) < h else "Yes")

Submission status: Accepted

Solution code:
H,N=map(int,input().split())
A=list(map(int,input().split()))
total=sum(A)
if (H-total)<=0:
  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) <= 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A = [list(map(int, input().split())) for _ in range(2)]

if sum(A[1]) >= A[0][0]:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
h,a = map(int,input().split())
l=list(map(int,input().split()))
sum=0
i=0
while h>=sum and i<a:
  sum+=l[i]
  i+=1
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()))

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

Submission status: Accepted

Solution code:
import sys
input = lambda: sys.stdin.readline().rstrip()

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
def actual(h, n, A):
    max_damage = sum(A)

    if max_damage >= h:
        return 'Yes'

    return 'No'

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

print(actual(h, n, A))

Submission status: Accepted

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

for i in l:
  num = i + num
  
if num >= h:
  print('Yes')
else:
  print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

input = lambda: sys.stdin.readline().rstrip()


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

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
n, m, *a = map(int, open(0).read().split())
if sum(a) >= n:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

    damage = 0

    for i in range(N):
        damage += A[i]
        if damage >= H:
            print("Yes")
            exit(0)

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

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
import heapq

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


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


# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
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()))

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

Submission status: Accepted

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

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("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
import decimal # 10進法に変換，正確な計算

def input():
    return sys.stdin.readline().strip()

def main():
    h, n = map(int, input().split())
    a = list(map(int, input().split()))    
    for i in a:
        h -= i
        if h <= 0:
            print("Yes")
            return
    print("No")
    

main()

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

Submission status: Accepted

Solution code:
from functools import reduce
from fractions import gcd
import math
import bisect
import itertools
import sys
sys.setrecursionlimit(10**7)
input = sys.stdin.readline
INF = float("inf")


# 処理内容
def main():
    H, N = map(int, input().split())
    A = list(map(int, input().split()))

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

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

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

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('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())
PP = list(map(int, input().split()))
print("Yes" if sum(PP) >= H else "No")

Submission status: Accepted

Solution code:
#B
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:
# coding: utf-8
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())
c = sum(map(int,input().split()))
print("Yes" if a<=c else "No")

Submission status: Accepted

Solution code:
H, N = map(int, input().split())
A    = list(map(int, input().split()))
for n in range(N):
    H = H - A[n]
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()))
cnt = 0
while (H > 0):
    for n in range(N):
        H = H - A[n]
    cnt += 1
if cnt == 1:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
H,N = list(map(int,input().split(" ")))
A = list(map(int,input().split(" ")))
total = 0
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())
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=list(map(int,input().split()))
attack=sum(a)
if h<=attack:
    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 = list(map(int, input().split()))
a = sorted(list(map(int, input().split())), reverse=True)
print('Yes' if sum(a[:n])>=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:
import sys
from collections import defaultdict
readline = sys.stdin.buffer.readline


def geta(fn=lambda s: s.decode()):
    return map(fn, readline().split())


def gete(fn=lambda s: s.decode()):
    return fn(readline().rstrip())


# sys.setrecursionlimit(10**5)


def main():
    h, n = geta(int)

    if h <= sum(list(geta(int))):
        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:
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()))

print("{}".format("Yes" if sum(A) >= H else "No"))

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys

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


def main():
    H, N = map(int, readline().split())
    As = map(int, readline().split())
    if sum(As) >= H:
        print('Yes')
    else:
        print('No')


if __name__ == '__main__':
    main()

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

main()

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 = [int(x) for x in input().split()]
a = [int(x) for x in input().split()]
print('Yes' if sum(a) >= h else 'No')

Submission status: Accepted

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

attack = sum(sorted(a, reverse=True)[:n])

if attack < h:
  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:
H, N = map(int , input().split())
#listにしたい時
list_n = list(map(int , input().split()))

for i in list_n:
    H -= i
    if H <= 0:
        print("Yes")
        break

if H > 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')