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()))
sum_A = sum(A)
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:
#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:
H,N=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 = sorted(map(int, input().split()), reverse=True)

i = 0
while H > 0 and i < N:
    H -= A[i]
    i += 1

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

Submission status: Accepted

Solution code:
inp = list(map(int, input().split()))
H = inp[0]
N = inp[1]
A = list(map(int, input().split()))

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

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()))
A.sort(reverse=True)
if sum(A[:n]) >= 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()))

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))

import numpy as np

sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

H, N = MAP()
A = np.array(LIST())

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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())
hoge=list(map(int,input().split()))

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

Submission status: Accepted

Solution code:
score, kinds = map(int, input().split())
waza = input().split()
count = 0
for i in waza:
  count += int(i)
if score <= count:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
hp,_ = [int(x) for x in input().split()]
skill = [int(x) for x in input().split()]
if hp <= sum(skill):
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

a =[int(i) for i in 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())))
if 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:
# coding: utf-8
H,N = map(int, input().split())
A = list(map(int, input().split()))

sum_attack = sum(A)
if sum_attack>=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:
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 = (int(x) for x in input().split())
a = list(map(int, input().split())) 
num = 0

for i in a:
    num+=i
    
if (num >= 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= int(input().split()[0])
print('YNeos'[sum([int(x) for x in input().split()])<H::2])

Submission status: Accepted

Solution code:
h, n = map(int, input().split())
a = [int(i) for i in input().split()]
print('Yes') if sum(a) >= h 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:
hp, n = map(int,input().split())
attack = list(map(int,input().split()))
k = sum(attack)
if hp > k:
    print("No")
else:
    print("Yes")

Submission status: Accepted

Solution code:
hp,num = map(int, input().split())
atk = map(int, input().split())
atkSum = sum(atk)

ret = "No"
if(atkSum >= hp):
    ret = "Yes"

print("{}".format(ret))

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

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

Submission status: Accepted

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

for i in range(h[1]):
  c = a[i] + c

if h[0] > c:
  print('No')
else:
  print('Yes')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def solve(h, n, a):
    return "Yes" if sum(a) >= h else "No"

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

Submission status: Accepted

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

array = list(map(int, input().split()))
            
total = sum(array)

if total >= h:
    print('Yes')

else:
    print('No')

Submission status: Accepted

Solution code:
H, _, *A = map(int, open(0).read().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:
H, N = map(int, input().split())
A = map(int, input().split())

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

Submission status: Accepted

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

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

sum=0
for i in damage:
    sum=sum+i
    if sum>=hp:
        print("Yes")
        break

if sum < hp:
    print("No")

Submission status: Accepted

Solution code:
# coding utf-8
import math
H, N = map(int, input().rstrip().split())

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

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

else:
    print("No")

Submission status: Accepted

Solution code:
a=input().rstrip().split(" ")
b=[]

b.append(input().rstrip().split(" "))

sum=0

for i in range(int(a[1])):
  sum+=int(b[0][i])

if int(a[0]) <= sum:
  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) <= 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

A_sum = sum(map(int, input().split()))

if H <= A_sum:
    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()]

"""
for i in range(n):
    h -= a[i]
"""

h -= sum(a)
if h <= 0:
    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()]

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()))
B = [0]*len(A)

while(H>0):
    for i in range(0,N):
        H-=A[i]
        B[i]+=1
ans = True
for i in range(0,N):
    if(B[i]!=1):
        ans=False
        break

print("Yes" if ans 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()))

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) >= h else 'No')

Submission status: Accepted

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

w = sum(a)

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

sum = 0
for i in a:
  sum += i
  if sum >= h:
    print('Yes')
    exit()

print('No')

Submission status: Accepted

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

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(input().split())
for i in range(n):
    h -= int(a[i])

if h > 0:
    print('No')
else:
    print("Yes")

Submission status: Accepted

Solution code:
from sys import stdin
H, N = [int(_) for _ in stdin.readline().rstrip().split()]
A = [int(_) for _ in stdin.readline().rstrip().split()]
for i in range(N):
    H -= A[i]
if H <= 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
import math
def IN(): return map(int,input().split())
ans = 0; mod = pow(10,9)+7
h,n=IN()
a=list(IN())
print('Yes'if sum(a)>=h else 'No')

Submission status: Accepted

Solution code:
List=[]
num = 0

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

for i in range(N):
    a = int(L[i])
    List.append(a)

for i in range(len(List)):
    num = num + List[i]

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
from itertools import product, permutations, combinations
from bisect import bisect_right,bisect_left
INF = float('inf')

H, N=map(int, input().split())
An=sorted(list(map(int, input().split())), reverse=True)
for a in An:
    H -= a

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

Submission status: Accepted

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

attack_sum = sum(A)


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

Submission status: Accepted

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

"""
name: 153B.py
プログラムの説明
"""

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

    TotalA = 0
    for i in A:
        TotalA += int(i)
    
    if H>TotalA:
        print('No')
    else:
        print('Yes')

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
hp,n=map(int,input().split())
at=list(map(int,input().split()))
if(hp>sum(at)):
    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(' '))
numlist = input().split(' ')
count = 0
for num in numlist:
  count += int(num)
  
if count >= H:
  print('Yes')
else:
  print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

s = sum(A)

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 = list(map(int,input().split()))
Ai = list(map(int,input().split()))

for attack in Ai:
    H -= attack

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#
# 　　  ⋀_⋀　 
#　　  (･ω･)  
# .／ Ｕ ∽ Ｕ＼
#  │＊　合　＊│
#  │＊　格　＊│ 
#  │＊　祈　＊│ 
#  │＊　願　＊│ 
#  │＊　　　＊│ 
#      ￣
#
import sys
sys.setrecursionlimit(10**6)
input=sys.stdin.readline
from math import floor,ceil,sqrt,factorial,hypot,log #log2ないｙｐ
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
from fractions import gcd
from random import randint
inf=float('inf')
mod = 10**9+7
def pprint(*A): 
    for a in A:     print(*a,sep='\n')
def INT_(n): return int(n)-1
def MI(): return map(int,input().split())
def MF(): return map(float, input().split())
def MI_(): return map(INT_,input().split())
def LI(): return list(MI())
def LI_(): return [int(x) - 1 for x in input().split()]
def LF(): return list(MF())
def LIN(n:int): return [I() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]
def LLIN_(n: int): return [LI_() for _ in range(n)]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def I(): return int(input())
def F(): return float(input())
def ST(): return input().replace('\n', '')
def main():
    H,N = MI()
    A = sum(LI())
    print("YNeos"[H>A::2])
if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

if count>=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 sys
 
 
hp, length = [int(v) for v in input().split(' ')]
damages = sorted([int(d) for d in input().split(' ')])
 
 
for d in reversed(damages):
    hp -= d
    if hp <= 0:
        print('Yes')
        sys.exit(0)

print('No')

Submission status: Accepted

Solution code:
def solve(string):
    h, n, *a = map(int, string.split())
    return "Yes" if h <= sum(a) else "No"


if __name__ == '__main__':
    import sys
    print(solve(sys.stdin.read().strip()))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

sum = sum(a)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
input_num=[input() for i in range(2)]

n=input_num[0].split()
n=list(map(int,n))
a=input_num[1].split()
a=list(map(int,a))

N=sum(a)

if n[0]<=N:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

s = sum(moves)
if s < h:
    resutl = "No"
else:
    resutl = "Yes"

print(resutl)

Submission status: Accepted

Solution code:
H,N=map(int,raw_input().split())
A=map(int,raw_input().split())
A.sort(reverse=True)
ans=False
for i in range(N):
  H = H - A[i]
  if H<=0:
    ans = True
    break
if ans:
  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:
#!/user/bin/env python
#pythonプログラムであることを示している

# -*- coding: utf-8 -*-
"""
このプログラムはPythonを書く際のテンプレとなっています。これをコピペしてコーディングを行なってください。
なお字下げしないこと！！
"""

__author_ = 'Maruta Yuzuha'
__version_ = '1.0.0'
__date__ = '2019/12/25'

def main():
    """
    ここでプログラムの解説を行う
     >>main()
    Hello world.
    0
    """
    s = input().split()
    t = input().split()
    a = 0
    for i in range(int(s[1])):
        a += int(t[i])
    b = int(s[0])
    if b <= a:
        print('Yes')
    else:
        print('No')

    return 0

if __name__ == '__main__':
    #上記のifの記述によってこのスクリプトファイルが起動された時だけ実行する部分になる。
    #ちなみにスクリプトが "モジュールとして"インポートされた時には実行されない、

    #単体テスト:モジュールのdocstring(ドキュメンテーション文字列)に記載された全ての対話実行例が書かれている通りに動作するかを確認
    #python ファイル名 -v
    import doctest
    doctest.testmod()

    #実際にmain()を呼び出して、結果を得て、その結果でPythonシステムを終える
    import sys
    sys.exit(main())

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
hp, atk = input().split()

hp = int(hp)
atk = int(atk)

value = 0

numlist = list((input().split()))

numlist = list(map(int, numlist))

for i in range(atk):
    value = value + numlist[i]

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

Submission status: Accepted

Solution code:
n,m=map(int,input().split())
l=list(map(int,input().split()))
s=sum(l)
if n<=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  = list(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 = [int(i) for i in 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()))

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

Submission status: Accepted

Solution code:
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush,heapify
import sys,bisect,math,itertools,pprint,fractions
sys.setrecursionlimit(10**8)
mod = 10**9+7
mod2 = 998244353
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpln(n): return list(int(sys.stdin.readline()) for i in range(n))

h,n = inpl()
a = inpl()
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[:n+1]):
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
'''
211 5
31 41 59 26 53
'''
power, moves = [int(x) for x in input().split()]
powers = [int(x) for x in input().split()]
print("No" if sum(powers) < power else "Yes")

Submission status: Accepted

Solution code:
#abc153b
h,n=map(int,raw_input().split())
a=map(int,raw_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("No")
else:
  print("Yes")

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

for a in a_list:
    h -= a

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# = int(input())
# = map(int, input().split())
# = list(map(int, input().split()))
# = list(input())
# = [tuple(map(int, input().split())) for _ in range(n)]

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:

a,b=map(int, input().split())
A = list(map(int, input().split()))
sum = 0
for at in A:
	sum += at
	
	
if a <= sum:
	print("Yes")
else:
	print("No")

Submission status: Accepted

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

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

Submission status: Accepted

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

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