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

Submission status: Accepted

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

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:
# B - Common Raccoon vs Monster
def main():
    H, _, *A = map(int, open(0).read().split())
    print("Yes" if sum(A) >= H else "No")


if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin

h, n = (int(v) for v in stdin.readline().split())
moves = (int(v) for v in stdin.readline().split())

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

Submission status: Accepted

Solution code:
n,k = map(int,input().split())
lis = list(map(int,input().split()))
if sum(lis) >= n:
  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:
s = [list(map(int,input().split())) for i in range(2)]
t = s[0]
H = t[0]
N = t[1]
u = s[1]
if sum(u) >= H:
    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()))
sum = 0
for v in A:
    sum += v
if H - sum <= 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

if S >= HP:
  print('Yes')
else:
  print('No')

Submission status: Accepted

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

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=input()
list=a.split()
sum=0
for item in list:
    sum=sum+int(item)
#print(sum)
if sum>=h:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
import sys

def propare():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    H = int(next(tokens))
    N = int(next(tokens))
    A_list = []
    for i in range(N):
        A_list.append(int(next(tokens)))

    solve(H, N, A_list)

def solve(H: int, N: int, A_list: list):
    sum_a = 0
    for a in A_list:
        sum_a = sum_a + a

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

    return


 
if __name__ == "__main__":
    propare()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

count = 0
for ax in a:
  count += ax
if count >= h:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
hn = [int(s) for s in input().split()]
h = hn[0]
arr = [int(s) for s in input().split()]
if sum(arr) >= h:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
import math


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

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

total = sum(data)

result = "No"
if total>=H:
    result = "Yes"
    
print(result)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n,_=list(map(int,input().split()))
print('YNeos'[sum(map(int,input().split()))<n::2])

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

Submission status: Accepted

Solution code:
import math
a,b = map(int,input().split())
arr = list(map(int,input().split()))
f = 0
for i in arr:
    a-=i
    if a<=0:
        f = 1
        break
if f == 1:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(2147483647)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

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

Submission status: Accepted

Solution code:
HP,number=map(int,input().split())
a=list(map(int, input().split()))

i=0
attack=0

while True:
  attack=attack+a[i]
  i=i+1
  if i==number:
    break

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

Submission status: Accepted

Solution code:
import sys

read = sys.stdin.read

H, N, *A = map(int, read().split())
if sum(A) >= H:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
import sys
import math
import itertools
H,N=map(int,input().split())
A=list(map(int,input().split()))
total=0
for i in range(N):
    total+=A[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()))
if h-sum(a)>0:
  print('No')
else:
  print('Yes')

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#標準入力(HPと必殺技種類)
s = [int(x) for x in input().split()]

hp = s[0]
atype =s[1]

#標準入力(必殺技で減らすHP)
n = [int(y) for y in input().split()]


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

Submission status: Accepted

Solution code:
h, n = map(int, input().split())
A = [int(x) for x in input().split()]
for a in A:
    h -= a
    if h <= 0:
        print('Yes')
        exit(0)
print('No')

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
import math
from bisect import bisect_left
from bisect import bisect_right
import collections
import copy
import heapq
from collections import defaultdict
from heapq import heappop, heappush
import itertools
input = sys.stdin.readline

##### リストの 二分木検索 #####
# bisect_left(lists, 3)
# bisect_right(lists, 3)

##### プライオリティキュー #####
# heapq.heapify(a) #リストaのheap化
# heapq.heappush(a,x) #heap化されたリストaに要素xを追加
# heapq.heappop(a) #heap化されたリストaから最小値を削除＆その最小値を出力

# heapq.heappush(a, -x) #最大値を取り出す時は、pushする時にマイナスにして入れよう
# heapq.heappop(a) * (-1) #取り出す時は、-1を掛けて取り出すこと

##### タプルリストのソート #####
# sorted(ans) #(a, b) -> 1st : aの昇順, 2nd : bの昇順
# sorted(SP, key=lambda x:(x[0],-x[1])) #(a, b) -> 1st : aの昇順, 2nd : bの降順
# sorted(SP, key=lambda x:(-x[0],x[1])) #(a, b) -> 1st : aの降順, 2nd : bの昇順
# sorted(SP, key=lambda x:(-x[0],-x[1])) #(a, b) -> 1st : aの降順, 2nd : bの降順

# sorted(SP, key=lambda x:(x[1])) #(a, b) -> 1st : bの昇順
# sorted(SP, key=lambda x:(-x[1])) #(a, b) -> 1st : bの降順

def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))

def main():
	H,N = inputMap()
	A = inputList()
 
	tmp = 0
	for i in A:
		tmp += i
 
	if tmp >= 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()))

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

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

Submission status: Accepted

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

if suma >= 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()))
HP=H

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

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

Submission status: Accepted

Solution code:
# coding: utf-8
h,n = [int(x) for x in input().split()]
A = [int(x) for x in input().split()]
t = 0
for a in A:
    t += a
print("Yes" if t >= h else "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, M = map(int, input().split())
X = sum(map(int, input().split()))
if H > X:
    print("No")
else:
    print("Yes")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

a,b=map(int,input().split())
array = map(int,input().split())

sum = 0

for skill in array:
  a -= skill
if(a <= 0):
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
import math
h, n = map(int, input().split())
li = map(int, input().split())
s = sum(li)

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

Submission status: Accepted

Solution code:
H,N = list(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()))

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

Submission status: Accepted

Solution code:
import sys

use_clipboard=True
bbn=1000000007
	
#+++++

		
def main():
	h, n = map(int, input().split())
	al=list(map(int, input().split()))
	ret = 'Yes' if sum(al)>=h else 'No'
	print(ret)
	
	
#+++++
isTest=False

def pa(v):
	if isTest:
		print(v)
		
class input_clipboard:
	def __init__(self,s):
		self.input_l=s.splitlines()
		self.ii=0
		
	def input(self):
		ret = self.input_l[self.ii]
		self.ii+=1
		return ret

if __name__ == "__main__":
	if sys.platform =='ios':
		if use_clipboard:
			import clipboard
			input_text=clipboard.get()
			ic=input_clipboard(input_text)
			input = lambda : ic.input()
		else:
			sys.stdin=open('inputFile.txt')
		isTest=True
	else:
		pass
		#input = sys.stdin.readline
			
	ret = main()
	if ret is not None:
		print(ret)

Submission status: Accepted

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

Submission status: Accepted

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

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

Ar = Input2

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
H,N =input().split()
h = int(H)
n = int(N)
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()))

for att in a:
    h -= att
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 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()))
c=0
for x in a:
  c+=x
if h<=c:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

#print(A)
if H-sumA <= 0:
  print('Yes')
else:
  print('No')

Submission status: Accepted

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

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

Submission status: Accepted

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

def attack_sum():
	sum_damage = 0
	for i in A:
		sum_damage += i
	return sum_damage

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

res = 0

for i in m:
    res += int(i)

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

Submission status: Accepted

Solution code:
H, N = 0, 0
while (H < 1 or H > 10**9) and (N < 1 or N > 10**5):
  H, N = input().split()
  H, N = int(H), int(N)
#A = []
flag = False
while flag == False:
  A = input().split()
  flag = (sum([((int(i) >= 1) and (int(i) <= 10**4)) for i in A]) == len(A) and N == len(A))

A = [int(s) for s in A]

for a in A:
  H -= a

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

else:
    print("No")

Submission status: Accepted

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

s = sum(a)

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

Submission status: Accepted

Solution code:
h, n = input().split()
H = int(h)
N = int(n)
lis_A = list(map(lambda x: int(x), input().split()))
sum_A = sum(lis_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()))
b=sum(a)
if H>b:
	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())

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

if h <= sum(list_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()))
t = 0
for i in range(N):
    H -= A[i]
    if H <= 0:
        break
    else:
        t += 1
if t < N:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
"""
raccoon has no time limit, so will be able to use all his moves once
so just sum up the damage of each move, if greater or equal to H
then he wins
"""


def can_raccoon_win(H, A):
  if sum(A) >= H:
    return "Yes"
  return "No"
  

if __name__ == "__main__":
  H = int(input().split()[0])
  A = map(int, input().split())
  print(can_raccoon_win(H, A))

Submission status: Accepted

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

# Input
s = [input() for i in range(2)]
HN = (list(s[0].split()))
A = (list(s[1].split()))

# Proccess
sum_a = 0
for i in range(int(HN[1])):
  sum_a = sum_a +int(A[i])
  
# Output							
if int(sum_a) >= int(HN[0]):
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
list1 = input().split(' ')
list2 = input().split(' ')
list2 =  [int(s) for s in list2]

num = int(list1[1])
HP = int(list1[0])
D = 0
for N in list2:
  D += N

if D >= HP:
  print('Yes')
else:
  print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
H,N = map(int,input().split())
A = [int(x) for x in input().split()]
for xg in A:
    H=H-xg
if H > 0:
    print('No')
elif H <= 0:
    print('Yes')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
sumDmg = 0
firstLine = input().split()
secondLine = input().split()
for n in range(len(secondLine)):
  sumDmg = sumDmg + int(secondLine[n])
if sumDmg >= int(firstLine[0]):
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

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

result = 0

for i in m:
    result += int(i)

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

Submission status: Accepted

Solution code:
ipt=input().split()
hp=int(ipt[0])
syurui=int(ipt[1])
tech=input().split()
for i in tech:
  atk=int(i)
  hp-=atk
if hp<=0:
  print('Yes')
else:
  print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
L = list(map(int,input().split()))
L.sort()
if b == 0:
    print("No")
    exit()
if b==1 and L[0]<a:
    print("No")
    exit()

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

Submission status: Accepted

Solution code:
s = input().split()  # s[0]は体力, s[1]は攻撃の種類
s2 = list(map(int, input().split()))  # 必殺技のリスト

# print(sum(s2))


if sum(s2) >= int(s[0]):
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

moves = list(map(int, input().split()))[::-1]

if sum(moves[:N]) >= 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()))

for a in A:
    H -= a

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

Submission status: Accepted

Solution code:
from itertools import permutations, combinations

nums = input().split()
As = input().split()
H = nums[0]
N = nums[1]
A = []

sum = 0

for B in As:
    sum = sum + int(B)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
in_len = input().split(" ")

in_h = int(in_len[0])
in_n = int(in_len[1])
in_a = input().split(" ")

for i in range(in_n):
  in_h -= int(in_a[i])

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
firstinput = input("")
secondinput = input("")
firstinputsplit = firstinput.split(" ")
secondinputsplit = secondinput.split(" ")
H = int(firstinputsplit[0])
N = int(firstinputsplit[1])
firstcont = H <= 1000000000 and N <= 1000000
skill = 0
exe = 0
for i in secondinputsplit:
    skill = skill + int(i)
    exe = exe + 1
if firstcont == True and exe == len(secondinputsplit):
  if H <= skill:
    print("Yes")
  else:
    print("No")
else:
  print(H)

Submission status: Accepted

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

Submission status: Accepted

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

if sum(c)>=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):
    ans = 'Yes'
else:
    ans = 'No'

print(ans)

Submission status: Accepted

Solution code:
h, n = input().split()
h = int(h)
n = int(n)
attack = sorted(list(map(int, input().split())), reverse=True)
while  n > 0:
    m_attack = attack[0]
    if h - m_attack <= 0:
        h = h - m_attack
        print("Yes")
        break
    else:   
        h = h - m_attack
        attack.remove(m_attack)
        n = n-1
if h > 0:
    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:
H, N =  map(int, input().split())
AList = list(map(int, input().split()))

for A in AList:
    H = H - A
    if H <= 0:
        break

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N, K=map(int, input().split())  #「A B」みたいなスペース空いた入力のとき
A = list(map(int,input().split()))

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
H, N = map(int, input().rstrip().split())
As = [int(x) for x in input().rstrip().split()]
total_attack = sum(As)
if H > total_attack:
    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 += a[i]
if (h <= sum):
    print("Yes")
else:
    print("No")

Submission status: Accepted

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