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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
ri = lambda S: [int(v) for v in S.split()]
def rii(): return ri(input())
 
H, N = rii()
A = rii()

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

Submission status: Accepted

Solution code:
z=list(map(int,input().split()))
x=list(map(int,input().split()))
d={}
c=0
for i in x:
       if d.get(i,0)==0:
              c+=i
if c>=z[0]:
       print("Yes")
else:
       print("No")

Submission status: Accepted

Solution code:
from sys import exit
import math
import collections
ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))

h,n = mi()
a = li()

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

Submission status: Accepted

Solution code:
import sys
# sys.setrecursionlimit(100000)


def input():
    return sys.stdin.readline().strip()


def input_int():
    return int(input())


def input_int_list():
    return [int(i) for i in input().split()]


def main():
    h, n = input_int_list()
    A = input_int_list()
    if sum(A) >= h:
        print("Yes")
    else:
        print("No")
    return


if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
h, n = map(int,input().split())
total = 0
flag = True
arr = list(map(int,input().split()))
for i in range(0,n):
      total += arr[i]
      if(total >= h):
            print("Yes")
            flag = False
            break

if flag:
      print("No")

Submission status: Accepted

Solution code:
n,d=list(map(int,input().split()))
s=list(map(int,input().split()))
v=0
for i in s:
    v+=int(i)
if v>=n:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
H,N=map(int,input().split())
lst=list(map(int,input().split()))
s=sum(lst)
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()))

sum_A = 0

for i in range(len(A_list)):
    sum_A += A_list[i]

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

Submission status: Accepted

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

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

SUM = 0
for i in range(len(A)):
    SUM = 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:
r=input().split()
H=int(r[0])
N=int(r[1])
data_pre=input().split()
data=[int(s) for s in data_pre]
if sum(data)>=H:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


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

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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


h,a=map(int,input().split())
A=list(map(int,input().split()))
sum_A=sum(A)
if h>sum_A:
    print("No")

else:
    print("Yes")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

sum =0
for i in range(len(A)):
	sum = sum + A[i]
if sum >= H:
	print("Yes")
else:
	print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

c = 0

for i in range(N):
  c = c + A[i]
  
if c >= 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 sum(A)>=H else 'No')

Submission status: Accepted

Solution code:
# B - Common Raccoon vs Monster
H,N = map(int,input().split())
A = list(map(int,input().split()))
ans = 'Yes' if H<=sum(A) else 'No'
print(ans)

Submission status: Accepted

Solution code:
def main():
    h, n = map(int, input().split())
    a_lst = list(map(int, input().split()))

    if sum(a_lst) >= h:
        ans = "Yes"
    else:
        ans = "No"

    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import os, sys, re, math

(H, N) = [int(n) for n in input().split()]
A = [int(n) for n in 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 h <= sum(a) else 'No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

a.sort(reverse=True)
ans = 'No'
for s in a:
    h -= s
    if h <= 0:
        ans = 'Yes'
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())
print('No' if sum(list(map(int,input().split()))) < H else 'Yes')

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]
dy8, dx8 = [0, -1, 0, 1, 1, -1, -1, 1], [1, 0, -1, 0, 1, 1, -1, -1]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


def ceil(a, b):
    return (a + b - 1) // b


def sum_of_arithmetic_progression(s, d, n):
    return n * (2 * s + (n - 1) * d) // 2


def gcd(a, b):
    if b == 0:
        return a
    return gcd(b, a % b)


def lcm(a, b):
    g = gcd(a, b)
    return a / g * b


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

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


def main():
    solve()


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

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

print(['No','Yes'][H <= 0])

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
H, N = map(int, input().split())
A = list(map(int, input().split()))
A.sort(reverse=True)
S = sum(A[: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()))
atack = sum(a)
can = h <= atack
print("Yes" if can else "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:
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:
# ABC153
# B Common Raccoon VS Monster
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()))
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("No")
else:
    print("Yes")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
h, n = map(int, input().split())
a = list(map(int, input().split()))
x = 0
for i in range(n):
    x = x + a[i]
print("Yes" if x >= h 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:
import bisect,collections,copy,heapq,itertools,math,numpy,string
import sys
sys.setrecursionlimit(10**7)

def S(): return sys.stdin.readline().rstrip()
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())

def main():
    H, N = LI()
    A = LI()
    print("Yes" if H<=sum(A) else "No")

main()

Submission status: Accepted

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

Submission status: Accepted

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

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:
a,b=map(int,input().split())
l=list(map(int,input().split()))
for i in range(b):
  a-=l[i]
print("Yes" if a<=0 else"No")

Submission status: Accepted

Solution code:
import sys
from itertools import accumulate

H, N = map(int, next(sys.stdin.buffer).split())
A = map(int, next(sys.stdin.buffer).split())

ans = any(map(lambda v: v >= H, accumulate(A, initial=0)))

print('Yes' if ans else 'No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
ins = lambda: input().rstrip()
ini = lambda: int(input().rstrip())
inm = lambda: map(int, input().split())
inl = lambda: list(map(int, input().split()))

h, n = inm()
a = sorted(inl(), reverse=True)
for i in a:
    h -= i
    if h <= 0:
        break
print("Yes" if h <= 0 else "No")

Submission status: Accepted

Solution code:
def main():
    h, n = map(int, input().split())
    a = [int(x) for x in input().split()]
    if h > sum(a):
        print('No')
    else:
        print('Yes')
        
if __name__ == '__main__':
    main()

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

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

Submission status: Accepted

Solution code:
H, _ = 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 sys, bisect, math, itertools, string, queue, copy
import numpy as np
import scipy
from collections import Counter,defaultdict,deque
from itertools import permutations, combinations
from heapq import heappop, heappush
from fractions import gcd
input = sys.stdin.readline
sys.setrecursionlimit(10**8)
mod = 10**9+7
def inp(): return int(input())
def inpm(): return map(int,input().split())
def inpl(): return list(map(int, input().split()))
def inpls(): return list(input().split())
def inplm(n): return list(int(input()) for _ in range(n))
def inplL(n): return [list(input()) for _ in range(n)]
def inplT(n): return [tuple(input()) for _ in range(n)]
def inpll(n): return [list(map(int, input().split())) for _ in range(n)]
def inplls(n): return sorted([list(map(int, input().split())) for _ in range(n)])

h,n = inpm()
A = inpl()

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

if sum(a) >= h:
  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()))
ans = ['No', 'Yes'][sum(A) >= H]
print(ans)

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

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

Submission status: Accepted

Solution code:
#https://atcoder.jp/contests/abc153/tasks/abc153_b
M,N =map(int,input().split())
N_List = list(map(int,input().split()))

if sum(N_List) < M:
    print("No")
else:
    print("Yes")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
H, n = map(int, input().split())
arr = list(map(int, input().split()))
sum = 0
for x in arr:
	sum += x
print("Yes" if sum >= H else "No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b,*cc = map(int, open(0).read().split())

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# Generated by https://github.com/kyuridenamida/atcoder-tools
from typing import *
import collections
import functools
import itertools
import math
import sys

INF = float('inf')
YES = "Yes"  # type: str
NO = "No"  # type: str


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


def main():

    sys.setrecursionlimit(10 ** 6)

    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]"
    print(f'{solve(H, N, A)}')


if __name__ == '__main__':
    main()

Submission status: Accepted

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

if '__main__' == __name__:
    resolve()

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys


def main():
    input = sys.stdin.buffer.readline
    h, _ = map(int, input().split())
    a = list(map(int, input().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=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:
h, n = map(int, input().split())
A = [int(i) for i in input().split()]

A.sort(reverse=True)

max_point = sum(A[:n])
ans = 'Yes'
if max_point < h:
    ans = 'No'
    
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
H, N = list(map(lambda x: int(x), input().split(" ")))
A = list(map(lambda y: int(y), 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()))

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

Submission status: Accepted

Solution code:
from fractions import gcd
from collections import Counter, deque, defaultdict
from heapq import heappush, heappop, heappushpop, heapify, heapreplace, merge
from bisect import bisect_left, bisect_right, bisect, insort_left, insort_right, insort
from itertools import product, combinations,permutations
from copy import deepcopy
import sys
sys.setrecursionlimit(4100000)



if __name__ == '__main__':
    H, N = map(int, input().split())
    A = list(map(int, input().split()))
    A.sort()
    A.reverse()
    for a in A:
        H -= a

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

Submission status: Accepted

Solution code:
MM = input().split()
H = int(MM[0])
N = int(MM[1])
AA = input().split()
total = 0
for i in AA:
  total += int(i)
if total >= H:
  print('Yes')
else:
  print('No')

Submission status: Accepted

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

Submission status: Accepted

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

if __name__ == "__main__":
    solve()

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    H, _ = map(int, input().split())
    A = map(int, input().split())

    cond = sum(A) >= H

    print('Yes' if cond else 'No')


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
l=list(map(int,input().split()))
l[::-1]
s=0
f=0
for i in range(len(l)):
  s+=l[i]
  if s>=a:
    f=1
    break 
  else:
    continue
if f==1:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# input
a, b = map(int, input().split())
x = list(map(int, input().split()))
print('Yes') if a <= sum(x) 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:
a,b=[int(i) for i in input().split()]
c=[int(i) for i 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()))

sum=0

for i in a:
    sum += i

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

Submission status: Accepted

Solution code:
def common_raccoon_vs_monster():
    # 入力
    H, N = map(int, input().split())
    A = list(map(int, input().split()))
    # 必殺技の合計攻撃力
    sum_A = 0 # 必殺技の攻撃力の合計
    for i in range(len(A)):
        sum_A += A[i]
    # 比較
    if H > sum_A:
        return 'No'
    else:
        return 'Yes'

result = common_raccoon_vs_monster()
print(result)

Submission status: Accepted

Solution code:
H,N = map(int,input().split())
a = list(map(int,input().split()))
a.sort()
reversed(a)
flag = True
for i in range(N):
  H-=a[i]
  if H<=0:
    flag = False
    print('Yes')
    break
if flag == True:
  print('No')

Submission status: Accepted

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

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

Submission status: Accepted

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

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