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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def solve():
    h, n = map(int, input().split())
    total = sum(list(map(int, input().split())))
    return "Yes" if total >= h else "No"

print(solve())

Submission status: Accepted

Solution code:
h, n  = map(int, input().split())
a  = list(map(int, input().split()))
'''
n = input()
a = [int(input()) for i in range(n)]
'''
'''
n,m = map(int, input().split())
a = [list(map(int, input().split())) for _ in range(m)]
'''
# c = collections.Counter()
#-------------------------------#

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 = 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:
#########行列読み込み ##############################################
"""
from sys import stdin
n = int(stdin.readline().rstrip())
data = [stdin.readline().rstrip().split() for _ in range(n)]
print(data)
print(*data, sep='\n')
"""
##################################################################
#########入力系####################################################
"""
s =input()
s=list(input())
a=int(input())
x,y = map(int,input().split())	
li = input().split()	
li = list(map(int,input().split()))	
li = input().split('T')	
"""
##################################################################
H, N = map(int,input().split())
#A = [0]*N
A = list(map(int,input().split()))	
if sum(A) >=H:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

for i in A:
    H -= i

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

Submission status: Accepted

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

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

if h - sum(a) <=0:

    print("Yes")

else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
INT_MAX=10**11+7
MOD=10**9+7
def INPUT():return list(int(i) for i in input().split())
def LIST_1D_ARRAY(n):return [0 for _ in range(n)]
def LIST_2D_ARRAY(m,n):return [[0 for _ in range(n)]for _ in range(m)]
#=======================================================================
import math as M
h,n=INPUT()
A=INPUT()
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()))
print("Yes") if H <= sum(A) else print("No")

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().strip()

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

Submission status: Accepted

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

k = sum(a)
print(["No","Yes"][k>=h])

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:
n, k = map(int, input().split())
a = list(map(int,input().split()))

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math
monsterHP, araiN = map(int, input().split())
araiSum = sum(list(map(int, input().split())))

if monsterHP <= araiSum:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

if 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:
import sys
import os
import math
import string
import collections

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

lcm = lambda x, y: x * y / math.gcd(x, y)

MOD = 10 ** 9 + 7
MAX = float('inf')


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    H, N = il()
    A = il()
    print('Yes' if H <= sum(A) else 'No')


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

Damages =sum(Attacks)

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
x,y = map(int,input().split())
li = list(map(int,input().split()))
if x - sum(li) <= 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
import numpy as np
h, n = map(int,input().split())
a = np.array(input().split(),dtype=int)
sum = 0
for i in a:
    sum += 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()))

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
H, N = map(int, input().split())
A = list(map(int, input().split()))
for Ai in A:
    H -= Ai
if H <= 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
h,n = map(int,input().split())
an = list(map(int,input().split()))
sum = 0

for i in range(n):
  sum += an[i]
  
if h<=sum :
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
import math

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

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
#template
def inputlist(): return [int(k) for k in input().split()]
#template
H,N = inputlist()
A = inputlist()
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()))

K = sum(A)

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

Submission status: Accepted

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

d = sum(c)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
h, n = map(int, sys.stdin.readline().split())
li = list(map(int, sys.stdin.readline().split()))
if h > sum(li):
  print('No')
else:
  print('Yes')

Submission status: Accepted

Solution code:
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())
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())
alist = list(map(int,input().split()))
p = 0
for i in range(N):
    p = p + alist[i]
if H <= p:
    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:
f=lambda:map(int,input().split())
h,_=f()
s=sum(f())
print('YNeos'[h-s>0::2])

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
n=list(map(int,input().split()))
if a<=sum(n):
  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:
#!/usr/bin/env python3

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

atk = sum(a_list)

if h>atk:
    print("No")
else:
    print("Yes")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
h,n = map(int,input().split())
z = input()
a = z.split()
c = 0
for b in a:
  c += int(b)
if h > c:
  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:
monster_hp ,kind = map(int,input().split())
li = list(map(int,input().split()))
if sum(li) >=monster_hp:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
l = [int(x) for x in input().split()]
m = [int(x) for x in input().split()]
H, N = l[0], l[1]

A = sum(m)

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

Submission status: Accepted

Solution code:
x = input().split()
y = input().split()
h = int(x[0])
n = int(x[1])

for i in y:
  h -= int(i)
  
if h > 0:
  print("No")
else:
  print("Yes")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
hp,bp=map(int,input().split())
attacks=list(map(int,input().split()))
if hp>sum(attacks):
  print("No")
else:
  print("Yes")

Submission status: Accepted

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

i = 0
for x in l:
    i += x

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


cnt =0

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

if h <= cnt:
    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 = map(int, input().split())
A = [int(x) for x in input().split()]
sum_A = sum(A)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    hp, n = list(map(int, input().split()))
    attacks = list(map(int, input().split()))
    if hp <= sum(attacks):
        print('Yes')
    else:
        print('No')


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
h,n = map(int,input().split())
try:
  a = list(map(int,input().split()))
except EOFError:
  pass
m = sum(a)
if h<=m:
  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:
        break
if H<=0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
# ABC 153: B – Common Raccoon vs Monster
H, N = map(int, input().split())
A = [int(s) for s in input().split()]

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
h, n = map(int, input().split())
a = list(map(int, input().split()))
a = sorted(a, reverse=True)
ans = 0
for i in range(n):
    ans += a[i]
if h <= ans:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
H, A = map(int,input().split())
A = list(map(int,input().split()))
A.sort(reverse=True)

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

print(ans)

Submission status: Accepted

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


ans = 'Yes'


if sum(A) < H:
    ans = 'No'


print(ans)

Submission status: Accepted

Solution code:
from collections import deque, Counter as cnt
from collections import defaultdict as dd
from operator import itemgetter as ig
from bisect import bisect_right as bsr
from math import factorial, ceil, floor
import sys
sys.setrecursionlimit(1000000)

# お約束
args = None
INF = float("inf")
MOD = int(1e9 + 7)


def input(*ps):
    if type(ps[0]) is list:
        return [input(*ps[0][:-1]) for _ in range(ps[0][-1])]
    elif len(ps) == 1:
        return ps[0](next(args))
    else:
        return [p(next(args)) for p in ps]


def nlist(n, v):
    if not n:
        return [] if type(v) is list else v
    return [nlist(n[1:], v) for _ in range(n[0])]


def yesno(v, yes="Yes", no="No", upper=False):
    if upper:
        print([yes.upper(), no.upper()][not v])
    else:
        print([yes, no][not v])


def main():
    """エントリーポイント"""
    H, N = input(int, int)
    A = input([int, N])
    yesno(H <= sum(A))


if __name__ == '__main__':
    args = iter(sys.stdin.read().split())
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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


# 入力を整数に変換して受け取る
def input_int():
    return int(input())


# マイナス1した値を返却
def int1(x):
    return int(x) - 1


# 半角スペース区切り入力をIntに変換してMapで受け取る
def input_to_int_map():
    return map(int, input().split())


# 半角スペース区切り入力をIntに変換して受け取る
def input_to_int_tuple():
    return tuple(map(int, input().split()))


# 半角スペース区切り入力をIntに変換してマイナス1した値を受け取る
def input_to_int_tuple_minus1():
    return tuple(map(int1, input().split()))


def main():
    h, n = input_to_int_map()
    a = input_to_int_tuple()

    ret = "Yes"
    if h - sum(a) > 0:
        ret = "No"

    return ret


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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
rs = lambda: input().strip()
ri = lambda: int(input())
rl = lambda: list(map(int, input().split()))
mod = 10**9 + 7

H, N = rl()
A = rl()

s = sum(A)

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

Submission status: Accepted

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

Submission status: Accepted

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

def main():
    *N, = map(int, open(0).read().split())
    H = N[0]
    A = N[2:]

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


main()

Submission status: Accepted

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

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

Submission status: Accepted

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: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

summ = sum(ls)
health = h - summ
if health <= 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
h, n = map(int, input().split())
a = list(map(int, input().split()))
a.sort()
a.reverse()
ans = False
dmg = 0
for i in a:
    dmg += i
    if dmg >= h:
        ans = True
        break
if ans:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n,m = map(int, input().split())
l= list(map(int, input().split()))
if n<=sum(l):
    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,*a=map(int,open(0).read().split());print('YNeos'[sum(a)<h::2])

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
'''
INPUT SHORTCUTS
N, K = map(int,input().split())
N ,A,B = map(int,input().split())
string = str(input())
arr = list(map(int,input().split()))
N = int(input())
'''


H, n = map(int,input().split())
arr = list(map(int,input().split()))
add = sum(arr)
if add>=H:
	print("Yes")
else:
	print("No")

Submission status: Accepted

Solution code:
import sys
import math
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10**8)
INF = float('inf')
MOD = 10**9+7


def main():
  H, N = map(int, readline().split())
  total = 0
  for a in map(int, readline().split()):
    total += a
  if total>=H:
    print('Yes')
  else:
    print('No')
  
  
  
if __name__ == '__main__':
  main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#B

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
H,N = map(int,input().split())
A = list(map(int,input().split()))
if(H <= sum(A)):
  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()))
a.sort()
k = 0
for num in a:
  h -= num
  k += 1
  if k == n:
    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) <= 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

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:
#Common Raccoon vs Monster
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()))
s = 0
for i in a:
    s += i
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()))
if sum(list)>=h:
	print('Yes')
else:
	print('No')

Submission status: Accepted

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

Submission status: Accepted

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

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