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

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def main():
  H, N = map(int, input().split())
  
  sum = 0
  
  A = list(map(int, input().split()))
  
  for a in A:
    sum += a
  
  if(sum >= H):
    print('Yes')
  else:
    print('No')
  
  return 0

if __name__ == "__main__":
  main()

Submission status: Accepted

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

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


a = sum(l)

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

Submission status: Accepted

Solution code:
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
from bisect import bisect_right, bisect_left
import random
from itertools import permutations, accumulate, combinations, product
import sys
import string
from bisect import bisect_left, bisect_right
from copy import deepcopy
from math import factorial, ceil, floor, gamma, log
from operator import mul
from functools import reduce


sys.setrecursionlimit(2147483647)
INF = float('INF')
def LI(): return list(map(int, sys.stdin.buffer.readline().split()))
def I(): return int(sys.stdin.buffer.readline())
def LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split()
def S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8')
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]
mod = 10 ** 9 + 7


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

Submission status: Accepted

Solution code:
#n = int(input())
import itertools

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

# kumiawase = list(itertools.permutations(a_L,3))

# for i in kumiawase:
#     ans = h
#     #print(ans,"ans")
#     for j in i:
#         ans -= j
#         if ans == 0:
#             print("Yes")
#             exit()

# print("No")

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
h, n = map(int, input().split())
A = list(map(int, input().split()))

A = sorted(A, reverse=True)
for a in A:
  h -= a
  if h <= 0:
    print('Yes')
    sys.exit()
print('No')
sys.exit()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

result = H - sum(waza)

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

Submission status: Accepted

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

import numpy as np

A = np.array(A)
su = A.sum()

if (hn[0]<=su):
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
# coding:utf-8

import sys
import math
import time
import numpy as np
import collections
from collections import deque
import queue
import copy

# 最大公約数
def gcd(m,n):
  x = max(m,n)
  y = min(m,n)
  if x%y == 0:
    return y
  else:
    while x%y != 0:
      z = x%y
      x = y
      y = z
    else:
      return z

# 幅優先探索(BFS)でスタート座標(x, y)からの最大距離返す
def bfs(SS, x, y, H, W):#入力(座標系(迷路), x, y, xの端, yの端)
  x_next = [0, 0, -1, 1]
  y_next = [1, -1, 0, 0]
  tempx = x
  tempy = y
  mlength = 0
  q = deque()
  xytuple = (x, y, 0)
  q.append(xytuple)


  while q:
    xytuple = q.popleft()
    SS[xytuple[0]][xytuple[1]] = "x" #探索した場所は探索できないようにする
    for i in range(4): #このforで上下左右を調べてる
      tempx = xytuple[0] + x_next[i]
      tempy = xytuple[1] + y_next[i]
      #print(tempx, tempy, xytuple[2])
      #print(S)
      if(0 <= tempx and tempx < H and 0 <= tempy and tempy < W and SS[tempx][tempy] == "."):
        temptuple = (tempx, tempy, xytuple[2]+1)
        SS[temptuple[0]][temptuple[1]] = "x" #探索した場所は探索できないようにする
        mlength = max(mlength, xytuple[2] +1)
        q.append(temptuple)
      #print(q)
  return mlength

def brick(a,n,m,N):#ABC 148
  #n番目以降にmがあるか調べる
  if not m in a[n:]:
    print(N-(m-1))
  else:
    #b = copy.deepcopy(a)
    brick(a,a[n:].index(m),m+1,N)

#X = str(input()).split()
#a = [int(x) for x in input().split()]
HA = str(input()).split()
H = int(HA[0])
A = int(HA[1])
a = [int(x) for x in input().split()]

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

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

Submission status: Accepted

Solution code:
H , N = map ( int , input().strip().split(" ") ) ;
L = sum ( map ( int , input().strip().split(" ") ) ) ;
print ( "Yes" if L >= 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:
n,k=map(int,input().split())
a=list(map(int,input().split()))
for i in range(k):
    n-=a[i]
if n<=0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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


import numpy as np

if H > np.sum(An):
    print('No')
else:
    print('Yes')

Submission status: Accepted

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

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

total=sum(mylist)

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(N):
    d=d+li[i]

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import math
import numpy as np

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

An = np.array(input().split(" "), dtype=np.int)

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

power_sum = 0
for i in range(len(a_list)):
    power_sum += a_list[i]

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def read_int_n():
    return list(map(int, input().split()))
hn=read_int_n()
h=hn[0]
n=hn[1]
a=read_int_n()
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()))
for a in A:
    H -= a
if H > 0:
    print("No")
else:
    print("Yes")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:

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

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

S = sum(A)

print("Yes" if H <= S else "No")

Submission status: Accepted

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

Submission status: Accepted

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

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

a_list.sort()

sum_d = 0

for i in range(b):
    sum_d += a_list[i-1]

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math 
h, n = map(int, input().split())
yes = 'Yes'
no = 'No'
A = list( map(int, input().split()))
if(h>sum(A)):
  print(no)
else:
  print(yes)

Submission status: Accepted

Solution code:
#abc153 a
h,n=map(int,input().split())
a=list(map(int,input().split()))
s=0
for x in a:
    s+=x
if s>=h:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

P = [int(p) for p in input().split()]
H = P[0]

A = [int(a) for a in input().split()]

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
H, N = input().split(" ")
As = input().split(" ")
num_As = [int(A) for A in As]
sum_A = sum(num_As) 
if sum_A >=int(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:
#!/usr/bin/env python3
import sys

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


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


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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

skill = list(map(int, input().split()))
power = sorted(skill, reverse=True)

if sum(skill[:N]) >= H:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
list_score = list(map(int, input().split()))
ans = "No"

if a <= sum(list_score):
    ans = "Yes"

print(ans)

Submission status: Accepted

Solution code:
s = input().rstrip().split(' ')
h = int(s[0])
n= int(s[1])
As = list(map(int, input().rstrip().split(' ')))

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

Submission status: Accepted

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

aaa = list(map(int, input().strip().split()))
at = 0
for i in range(a):
  t = aaa[i]
  at += t

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

Submission status: Accepted

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


def inputIntList():
  return [int(s) for s in input().split()]


def inputInt():
  return int(input())


def main():
  H, N = inputIntList()
  A = inputIntList()
  ans = 'Yes' if sum(A) >= H else 'No'
  return ans


if __name__ == "__main__":
  print(main())

Submission status: Accepted

Solution code:
H, N = map(int, input().split())
A = sorted([int(x) for x in input().split()])
#print(A)
ATK=0

for i in range(N):
	ATK+=A[(N-1)-i]
	#print(i,ATK)

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np

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

A = np.array(A)
A_all = np.sum(A)

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

Submission status: Accepted

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

s = sum(a)

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

Submission status: Accepted

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

Submission status: Accepted

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

line = input().rstrip().split(' ')
a = [0] * n
sum = 0
for i in range(n):
    a[i] = int(line[i])
    sum += a[i]

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

summ = sum(A)

if summ < h:
    print('No')
else:
    print('Yes')

Submission status: Accepted

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

Submission status: Accepted

Solution code:

h,n = [int(i) for i in input().split()]
data = [int(i) for i in input().split()]
data.sort(reverse=True)
x = sum(data[:n])
#print(data[:n])
if x>=h:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:

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

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

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

for a in a_list:
    H -= a

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

Submission status: Accepted

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

s = 0
for i, n in enumerate(A):
    s += n

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import collections
import itertools as it
import math
import numpy as np

# A = input()
# A = int(input())
# A = map(int, input().split())
# A = list(map(int, input().split()))
# A = [int(input()) for i in range(N)]
#
# c = collections.Counter()
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:
arr = input().split(" ")
H = int(arr[0])
N = int(arr[1])

attacks = input().split(" ")
ans = 0

for a in attacks:
    ans += int(a)

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

Submission status: Accepted

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

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

Submission status: Accepted

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

H, N = map(int, input().split())
A = list(map(int, input().split()))
msg = "No"
for i in range(N):
    H -= A[i]
    if H <= 0:
        msg = "Yes"
        break
print(msg)

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

sum=0

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

H,N=map(int, input().split())
A=list(map(int,input().split()))
A.sort(reverse=True)
count=0
#print(A)
for i in range(N):
    count=count+A[i]

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

SumList = sum(List)

if SumList >= 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 H<=total:
  ans = 'Yes'
else:
  ans = 'No'
  
print(ans)

Submission status: Accepted

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

h = a[0]
n = a[1]

t = sum(b)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.read

h,n,*lst=map(int, read().split())
s=sum(lst)
if s>=h:
  print('Yes')
else:
  print('No')

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

for i in range(n):
  total += kill[i]

if hp > total:
  print("No")
else:
  print("Yes")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
h, n = map(int, input().split())
a = list(map(int, input().split()))
a.sort(reverse=True)
d = 0
i = 0

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

if(d<h):
    print("No")
else:
    print("Yes")

Submission status: Accepted

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

[H, N] = [int(i) for i in input().split()]
A = [int(i) for i in input().split()]

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

Submission status: Accepted

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

ans = "No"

for i in li:
  H -= i

  if H <= 0:
    ans = "Yes"

print(ans)

Submission status: Accepted

Solution code:
H, N = map(int, input().split())
A_list = list(map(int, input().split()))
total = 0
for A in A_list:
    total += A

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Sun Jan 26 20:58:37 2020

@author: H_Hoshigi
"""

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

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

sum_A = 0
for i in A_list:
    sum_A += i

answer = ""
if H <= sum_A:
    answer = "Yes"
else:
    answer = "No"

print(answer)

Submission status: Accepted

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

Submission status: Accepted

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

buf = 0

for i in a:
    buf += i

if buf >= h:
    print("Yes")

else:
    print("No")

Submission status: Accepted

Solution code:
h,n = map(int,input().split())
a = list(map(int,input().split()))
del a[n::]
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()))
judge = 'No'
for ai in a:
  h -= ai
if h <= 0: judge = 'Yes'
print(judge)

Submission status: Accepted

Solution code:
H,N = map(int,input().split())
Al = sorted(list(map(int,input().split())))[::-1]

ans = "Yes" if sum(Al[:N])>=H else "No"
print(ans)

Submission status: Accepted

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

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

print('No')

Submission status: Accepted

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

def sum(list):
    s = 0
    for i in range(len(list)):
        s = s+ list[i]
    return s


summ = sum(a_list)



if summ >= 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 numpy as np

H, _ = list(map(int, input().split()))
A = np.array(list(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 = list(map(int, input().split()))

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

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()))
A.sort()
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:
"""
NTC here
"""
import sys
inp= sys.stdin.readline
input = lambda : inp().strip()
flush= sys.stdout.flush
# import threading
# sys.setrecursionlimit(10**6)
# threading.stack_size(2**25)

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

# range = xrange
# input = raw_input


def main():
    h, n = lin()
    a = lin()
    sm = sum(a)
    print('Yes' if h<=sm else 'No')



            
        

        
main()
# threading.Thread(target=main).start()

Submission status: Accepted

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

A = [int(n) for n in input().split(' ')]

A.sort(reverse=True)

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

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(n):
    h -= a[i]
    if h <= 0:
        print("Yes")
        exit()
        #sys.exit(0)

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

Submission status: Accepted

Solution code:
a=[int(i) for i in input().split()]
b=[int(i) for i in input().split()]
d=0
for i in range(a[1]):
   d+=b[i]

if a[0]-d<=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,*a=map(int,open(0).read().split())

# h = int(input())
h, k = [int(x) for x in input().split()]
# k = int(input())

# ヨコ
m = [int(x) for x in input().split()]

# タテ
# m = [int(input()) for _ in range(N)]

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

else:
  print('No')