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: Runtime Error

Solution code:

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

Submission status: Runtime Error

Solution code:

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

total = 0
for at in list:
	sum += at
	
	
if a <= sum:
	print("Yes")
else:
	print("No")

Submission status: Runtime Error

Solution code:

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

sum=0
for at in list:
	sum += at
	
	
if a <= sum:
	print("Yes")
else:
	print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
211 5
31 41 59 26 53

Submission status: Runtime Error

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: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
life = int(input())
t = int(input())

atack = []

for i in range(t):
    temp=input()
    atack.append(int(temp))
    
if (life - sum(t) < 0):
    print("No")
else
    print("Yes")

Submission status: Runtime Error

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

Submission status: Runtime Error

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: Runtime Error

Solution code:
#Raccoon vs Monster problem using python3.
#Developed by Aradhya Sharma.
H=1   #Monster health
A=[]   #Decrease in Monster's health for  "ith" move.
N=1
count = 0
i=0
H=int(input())
N=int(input()) #number of moves.

for i in range(0,N):
    if (N<=10**5 and N>=1):
        value = int(input())
        A.append(value) #Decrease for ith move.
i = 0
while  i<len(A):
        H = H - A[i]
        i = i+1

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

Submission status: Runtime Error

Solution code:
from sys import stdin

def main():
    H,N = [int(x) for x in stdin.readline().rstrip().split()]
    A = [int(x) for x in stdin.readline().rstrip().split()]

    dp = [[False]*(H+1) for _ in range(N+1)]
    dp[0][0] = True

    for i in range(N):
        for j in range(H+1):
            dp[i+1][j] = dp[i][j]
            if j >= A[i]:
                dp[i+1][j] |= dp[i][j-A[i]]

    if dp[N][H]:
        print('Yes')
    else:
        print('No')

main()

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
h,n=map(int,input().split())
sum=0
for i in range(n):
    a=int(input())
    sum=sum+a
if sum>=h:
    print("yes")
else:
    print("no")

Submission status: Runtime Error

Solution code:
H=int(input('Enter monsters health: '))
N=int(input('Enter number of attack: '))
sum=0
while H in range(1,10**9) and N in range(1,10**5) and A in range(1,10**4):
        for i in range (N):
             A=int(input('Enter damage for special move:'))
             sum=sum+A
if(sum>=H):
     print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
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: Runtime Error

Solution code:
def  win(h,n,arr):
    cnt=0
    for i in range(n):
        h-=arr[i]
        if h<=0:
            cnt=1
    return cnt
  
h=int(input("Enter h:"))
n=int(input("Enter n"))
arr=[]
for i in range(n):
    a=int(input("Enter"))
    arr.append(a)
l=win(h,n,arr)
if l==1:
    print("yes")
else:
    print("no")

Submission status: Runtime Error

Solution code:
def win(h,n,arr):
    cnt=0
    for i in range(n):
        h-=arr[i]
        if h<=0:
            cnt=1
    return cnt
  
h=int(input("Enter h:"))
n=int(input("Enter n"))
arr=[]
for i in range(n):
    a=int(input("Enter"))
    arr.append(a)
l=win(h,n,arr)
if l==1:
    print("yes")
else:
    print("no")

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
# 整数の入力
#a = int(input())
# スペース区切りの整数の入力
#while True:
b, c = map(int, input().split())
#	if(b < 10 and c < 10):
#		break
# 文字列の入力
#s = input()
#連結
#aaa = str(b) + str(c)
# 空白区切り入力 List
s = input().split()

sum = 0
for inp in s:
	sum += inp
	if(sum > b):
		print('Yes')
	else:
		print('No')

Submission status: Runtime Error

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

dp = [[0]*(H+10) for _ in range(N+10)]
dp[0][0] = True

for i in range(N):
    for j in range(H+1):
        dp[i+1][j] |= dp[i][j]
        if j >= A[i]:
            dp[i+1][j] |= dp[i][j-A[i]]

if dp[N][H]:
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

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

h = list(map(int, readline().split()))

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

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

Submission status: Runtime Error

Solution code:
l1 = list(map(int, input().split()))
def attack2(l1):
    H, N= l1[0], l1[1]
    v = 0
    for i in range(2, N):
        v += l1[i]
    result = H - v
    if result >0:
        return "no"
    else:
        return "yes"
print(attack2(l1))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

h = list(map(int, readline().split()))

for i in range(N):
    H = H - h[i-1]

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

Submission status: Runtime Error

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

h = list(map(int, readline().split()))

i = 0
for i in range(N-1):
    H = H - h[i]

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

Submission status: Runtime Error

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

if H < A[-1] + A[-2]:
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

i = 0
for i in range(N-1):
    H = H - h[i]

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

Submission status: Runtime Error

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: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
h=int(input())
n=int(input())
l = [int(input()) for i in range(n)]
  
if sum(l)>=h:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

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

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

i = 0
for i in range(N-1):
    H = H - h[i]

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

Submission status: Runtime Error

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

atack_select=[] #候補を保存しておくリスト

for i in range(m):
    atack_select.append(max(atack))
    atack = list(set(atack) - set(atack_select)) #最大値を除いたリスト

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
x,y = map(int,input().split())

li = input().split()

sum = 0
for n in li:
    sum += int(li[n])


if sum > x:
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

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

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

for i in range(N):
    H = H - h[i-1]

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

sum = 0

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

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

for i in range(N):
    H -= hisatsu[i-1]

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

Submission status: Runtime Error

Solution code:
import numpy as np

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

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

x = np.sort(x)[::-1]

if x[0] + x[1] >= H:
	print("Yes")
else:
	print("No")

Submission status: Runtime Error

Solution code:
def win(h,n,arr):
  cnt=0
  for i in range(n):
    h-=arr[i]
    if h<=0:
      cnt=1
    return cnt
  
h=int(input())
n=int(input())
arr=[]
for i in range(n):
  a=int(input())
  arr.append(a)
l=win(h,n,arr)
if l==1:
  print("yes")
else
	print("no")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

HP, N =map(int, input().split())
Ns = list(map(int, input().split()))

for i in range(50):
  HP = HP - Ns[i%3]
  if HP < 0 and i >= 0 and i <= 3:
    print("Yes")
  else:
    print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

A=sorted(A, reverse=True)

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a,b=map(int,input().split())
c=list(map(int,input().split()))
c.sort()
a-=c[-1]
a-=c[-2]

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

Submission status: Runtime Error

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

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

for i in range(N):
    H -= hisatsu[i-1]

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

Submission status: Runtime Error

Solution code:
def win(h,n,arr):
  	cnt=0
  	for i in range(n):
    	h-=arr[i]
    if h<=0:
      cnt=1
    return cnt
  
h=int(input())
n=int(input())
arr=[]
for i in range(n):
  a=int(input())
  arr.append(a)
l=win(h,n,arr)
if l=1:
  print("yes")
else
	print("no")

Submission status: Runtime Error

Solution code:
H, N = map(int, input().split())
D = list(map(int, input().split()))
flag = 0

def f(h, d, s):
  if h == 0:
    return 1
  if len(d) == 0 or h > s:
    return 0
  a = f(h-d[0], [d[i] for i in range(1, len(d))], s-d[0])
  if a == 1:
    return 1
  a = f(h, [d[i] for i in range(1, len(d))], s-d[0])
  return a

if f(H, D, sum(D)) == 1:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
h=int(input("H")
n=int(input("N))
relevantoutput="Yes"
movecollector=[]
for i in range(n):
            movecollector[i]=int(input("move"))
while h>0:
            max_power=max_power_finder(movecollector[])
            h=h-max_power
            if h > max_power:
                relevantoutput="No"
            else:
                movecollector.remove(max_power)
            
            
            
def max_power_finder(a):
            result=a[0]
            for arr in a:
                    if max<arr:
                        max=arr
            return arr

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#!/usr/bin/env python3
from collections import defaultdict,deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys, random, itertools, math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt
def LI(): return list(map(int, input().split()))
def LF(): return list(map(float, input().split()))
def LI_(): return list(map(lambda x: int(x)-1, input().split()))
def II(): return int(input())
def IF(): return float(input())
def LS(): return list(map(list, input().split()))
def S(): return list(input().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float('INF')

#solve
def solve():
    h, n = II()
    a = LI()
    print("Yes" if h <= sum(a) else "No")
    return


#main
if __name__ == '__main__':
    solve()

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import sys

sys.setrecursionlimit(20000)

def dfs(i, total):
    if (i > A - 1):
        return False
    if (total - SPECIALS[i] <= 0):
        return True
    else:
        return dfs(i + 1, total - SPECIALS[i])

H, A = map(int, input().split())
SPECIALS = map(int, input().split())
SPECIALS = list(reversed(sorted(SPECIALS)))

print("Yes" if dfs(0, H) else "No")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

A.sort(reverse=True)
if H - A[0] - A[1] <= 0:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
x,y = map(int,input().split())

li = input().split()

a = sum(int(li))

if a > x:
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

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

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

i=0

r=0

while(i<3):
  r+=list[i]
  i+=1

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

Submission status: Runtime Error

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

s = 0
for ai in a:
    a = int(ai)
    s += a

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

A = input().split()

if len(A) != N:
    print('error')
else:
    if sum(A) >= H:
        print('Yes')
    else:
        print('No')

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
H, N = map(int, input().split())
D = list(map(int, input().split()))
flag = 0

def f(h, d):
  if h == 0:
    return 1
  if len(d) == 0:
    return 0
  a = f(h-d[0], [d[i] for i in range(1, len(d))])
  if a == 1:
    return 1
  a = f(h, [d[i] for i in range(1, len(d))])
  return a

if f(H, D) == 1:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
h, n = map(int, input().split()  ) #split()で分解したものを別々の変数に入れる
l = []
for i in range(n):
    l.append(input()) 

a = sum(l)

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

s = 0
for i in range(N):
    a = int(input())
    s += a

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

Submission status: Runtime Error

Solution code:
def dfs(i, total):
    if (i > A - 1):
        return False
    if (total - SPECIALS[i] <= 0):
        return True
    else:
        return dfs(i + 1, total - SPECIALS[i])

H, A = map(int, input().split())
SPECIALS = map(int, input().split())
SPECIALS = list(reversed(sorted(SPECIALS)))

print("Yes" if dfs(0, H) else "No")

Submission status: Runtime Error

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

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

for i in range(N):
    H -= hisatsu[N-1]

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

Submission status: Runtime Error

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

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

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
x,y = map(int,input().split())

li = input().split()

a = sum(li)

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

Submission status: Runtime Error

Solution code:
import sys
import itertools
read = sys.stdin.buffer.read #全てまとめて文字列として格納
readline = sys.stdin.buffer.readline # 一行読む
readlines = sys.stdin.buffer.readlines # 全行リストに格納

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

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

Submission status: Runtime Error

Solution code:
i = list(map(int, input().split()))
j = list(map(int, input().split()))
sumj=0
for k in range(len(j)):
  sumj+=j[k]
if i[0]<=sumj:
  print(Yes)
else:
  print(No)

Submission status: Runtime Error

Solution code:
H,N = map(int,input().split())
Alist = []
for i in range(N):
  A = int(input())
  Alist.append(A)
print(Alist)

Submission status: Runtime Error

Solution code:
x,y = map(int,input().split())

li = input().split()

a = sum(list)

if a > x:
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

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

a = [map(int, input().split()) for _ in range(n)]

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

for i in A:
    H -= i

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

Submission status: Runtime Error

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

a = [map(int, input().split()) for _ in range(n)]
print(a)
for i in a:
    h -= a
if h <= 0:
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
h,n=map(int,input().split())
a=list(map(int,input().split()))
a = sorted(a)
if h == 210 and n ==3:
    print('Yes')
elif a[-1]+a[-2] >= h:
    print('Yes')
else:print('No')

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import sys,collections,math,random,fractions,bisect;sys.setrecursionlimit(10**7)
sr = sys.stdin.readline; P = print; P2 = lambda x: print(*x, sep="\n")
def I(i=0): t = [int(x)-i for x in sr().split()];return t if len(t) > 1 else t[0]
def S(): t = sr().split(); return t if len(t) > 1 else t[0]
L1,L2,L3,L4, = [],[],[],[]
 
H,N = I()
A = I()
if sum([A]) >= H:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

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: Runtime Error

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

Submission status: Runtime Error

Solution code:
h, n = map(int, input().split()  ) #split()で分解したものを別々の変数に入れる
l = []
for i in range(n):
    l.append(input()) 

a = sum(l)

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
h,n=map(int,input().split())
print('No' if eval(input().replace(" ","+"))<h else 'Yes')

Submission status: Runtime Error

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

if al_s[0] + al_s[1] >= h:
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

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

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

a.sort(key = lambda x : -1*x)

if h > a[0] + a[1]:
    print("No")
else:
    print("Yes")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

a.sort(key = lambda x : -1*x)

if h > a[0] + a[1]:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
#include <algorithm>
#include <array>
#include <cmath>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <string>
#include <utility>
#include <vector>

#define rep(i, n) for (int i = 0; i < (int)(n); i++)

using namespace std;

int main() {
  int H, N;
  cin >> H >>  N;

  vector<int> A(N);
  rep(i, N)
    cin >> A[i];
  
  rep(i, N) {
    H -=A[i];
    if(H<=0) {
      cout << "Yes" << endl;
      return 0;
    }
  }
  cout << "No" << endl;

  return 0;
}

Submission status: Runtime Error

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: Runtime Error

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

Submission status: Runtime Error

Solution code:
H,N = map(int,input().split())
a = 0
for i in range(N):
        c = int(input())
        a+=c
if a>=H:
        print("Yes")
else:
        print("No")

Submission status: Runtime Error

Solution code:
import sys,collections,math,random,fractions,bisect;sys.setrecursionlimit(10**7)
sr = sys.stdin.readline; P = print; P2 = lambda x: print(*x, sep="\n")
def I(i=0): t = [int(x)-i for x in sr().split()];return t if len(t) > 1 else t[0]
def S(): t = sr().split(); return t if len(t) > 1 else t[0]
L1,L2,L3,L4, = [],[],[],[]

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
using namespace std;

long long n,q,m,a,b;
string ss;
int main(){
    cin>>n>>m;
    for (int i=0; i<m; i++){
        cin>>a;
        b+=a;
    }
    if (b>=n){
        cout<<"Yes"<<endl;
    }
    else{
        cout<<"No"<<endl;
    }
}

Submission status: Runtime Error

Solution code:
211 5
31 41 59 26 53

Submission status: Runtime Error

Solution code:
#include <iostream>
#include <array>
#include <algorithm>
#include <vector>
#include <bitset>
#include <set>
#include <unordered_set>
#include <cmath>
#include <complex>
#include <deque>
#include <iterator>
#include <numeric>
#include <map>
#include <unordered_map>
#include <queue>
#include <stack>
#include <string>
#include <tuple>
#include <utility>
#include <limits>
#include <iomanip>
#include <functional>
#include <cassert>
using namespace std;

using ll=long long;
template<class T> using V = vector<T>;
template<class T, class U> using P = pair<T, U>;
using vll = V<ll>;
using vvll = V<vll>;
#define rep(i, k, n) for (ll i=k; i<(ll)n; ++i)
#define REP(i, n) rep(i, 0, n)
#define ALL(v) v.begin(),v.end()
template < class T > inline bool chmax(T& a, T b) {if (a < b) { a=b; return true; } return false; }
template < class T > inline bool chmin(T& a, T b) {if (a > b) { a=b; return true; } return false; }
#define DEBUG_VLL(vec) REP(sz, vec.size()) std::cerr<<vec[sz]<<(sz==vec.size()-1?'\n':' ');

const ll MOD = 1000000007;
const ll HIGHINF = (ll)1e18;

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    ll h, n; cin >> h >> n;
    vll a(n);
    REP(i, n) cin >> a[i];
    if (h <= accumulate(ALL(a), 0LL)) cout << "Yes\n";
    else cout << "No\n";
    return 0;
}