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:
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
# input = sys.stdin.readline
sys.setrecursionlimit(10**8)
mod = 10**9+7
def inp(): return int(input()) # n=1
def inpm(): return map(int,input().split()) # x=1,y=2
def inpl(): return list(map(int, input().split())) # a=[1,2,3,4,5,...,n]
def inpls(): return list(input().split())  # a=['1','2','3',...,'n']
def inplm(n): return list(int(input()) for _ in range(n)) # x=[] 複数行
def inplL(n): return [list(input()) for _ in range(n)]
def inplT(n): return [tuple(input()) for _ in range(n)]
def inpll(n): return sorted([list(map(int, input().split())) for _ in range(n)]) # [[1,1,1,1],[2,2,2,2],[3,3,3,3]] 
def graph():
    n=inp()
    g=[[] for _ in range(n)]
    for i in range(n):
        a = inp()
        a -= 1
        g[i].append(a)
        g[a].append(i)
    return n,g

def main():
    h,n = inpm()
    a = inpl()
    if h <= sum(a):
        print('Yes')
    else:
        print('No')
    
if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
h,n=map(int,input().split())
s=sum(map(int,input().split()))
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:
import math
import fractions

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    # divisors.sort()
    return divisors

def ValueToBits(x,digit):
    res = [0 for i in range(digit)]
    now = x
    for i in range(digit):
        res[i]=now%2
        now = now >> 1
    return res

def BitsToValue(arr):
    n = len(arr)
    ans = 0
    for i in range(n):
        ans+= arr[i] * 2**i
    return ans

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


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

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

Submission status: Accepted

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

def ri():
    return int(input())

def rl():
    return list(input().split())

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

def main():
    h, n = rli()
    la = rli()
    if (sum(la) >= h):
        print("Yes")
    else:
        print("No")


if __name__ == '__main__':
    main()

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:
def main():

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


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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from math import ceil
h, n = map(int, input().split())
a_array = [int(x) for x in input().split()]
print("Yes" if sum(a_array) >= 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:
h,n=map(int,input().split())
a=[]
a=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:
import math
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:
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 = 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 = list(map(int,input().split()))
X = sum(A)
if X >= 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()]
print("Yes" if sum(A) >= H else "No")

Submission status: Accepted

Solution code:
# encoding:utf-8
import copy
import random
import bisect #bisect_left　これで二部探索の大小検索が行える
import fractions #最小公倍数などはこっち
import math
import sys
import bisect

mod = 10**9+7
sys.setrecursionlimit(mod) # 再帰回数上限はでdefault1000

def LI(): return list(map(int, sys.stdin.readline().split()))

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

Submission status: Accepted

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

sm = sum(arr)
if sm >= 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 = "No"
else:
    ans = "Yes"
print(ans)

Submission status: Accepted

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


def solve(inp):
    import math
    (H, N) = map(int, inp.readline().strip().split(' '))
    A = list(map(int, inp.readline().strip().split(' ')))

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


def main():
    import sys
    result = solve(sys.stdin)
    if result is not None and result != '':
        print(result)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,queue,copy

sys.setrecursionlimit(10**7)
inf=10**20
mod=10**9+7
dd=[(-1,0),(0,1),(1,0),(0,-1)]
ddn=[(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return input()

def main():
  h,n=LI()
  l=LI()

  if h<=sum(l):
    return 'Yes'
  return 'No'

# main()
print(main())

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    a, b = map(int, input().split())
    c = sum(list(map(int, input().split())))
    print(['No', 'Yes'][a <= c])


main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

Solution code:
H,N = [int(n) for n in input().split()]
A = [int(n) for n in input().split()]
print("Yes" if sum(A) >= H else "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:
import math
import fractions
import bisect
import collections
import itertools
import heapq
import string
import sys
import copy
from collections import deque
sys.setrecursionlimit(10**7)
MOD = 10**9+7
def gcd(a,b):return fractions.gcd(a,b) #最大公約数
def lcm(a,b):return (a*b) // fractions.gcd(a,b) #最小公倍数
def iin(): return int(input()) #整数読み込み
def ifn(): return float(input()) #浮動小数点読み込み
def isn(): return input().split() #文字列読み込み
def imn(): return map(int, input().split()) #整数map取得
def fmn(): return map(float, input().split()) #浮動小数点map取得
def iln(): return list(map(int, input().split())) #整数リスト取得
def iln_s(): return sorted(iln()) # 昇順の整数リスト取得
def iln_r(): return sorted(iln(), reverse=True) # 降順の整数リスト取得
def fln(): return list(map(float, input().split())) # 浮動小数点リスト取得
def join(l, s=''): return s.join(l) #リストを文字列に変換
def perm(l, n): return itertools.permutations(l, n) # 順列取得
def perm_count(n, r): return math.factorial(n) // math.factorial(n-r) # 順列の総数
def comb(l, n): return itertools.combinations(l, n) # 組み合わせ取得
def comb_count(n, r): return math.factorial(n) // (math.factorial(n-r) * math.factorial(r)) #組み合わせの総数
def two_distance(a, b, c, d): return ((c-a)**2 + (d-b)**2)**.5 # 2点間の距離
def m_add(a,b): return (a+b) % MOD

H,N = imn()
A = iln()

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

Submission status: Accepted

Solution code:
import sys

def get_array(): return list(map(int, sys.stdin.readline().split()))
def get_ints(): return map(int, sys.stdin.readline().split())

h,n = get_ints()
Arr = get_array()
if sum(Arr)>=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())
As = sum(list(map(int, input().split())))
print("Yes" if H <= As else "No")

Submission status: Accepted

Solution code:
from math import ceil
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:
import sys
input = sys.stdin.readline

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:
import queue
import copy
import math
from collections import deque

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

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

sum_a = sum(an)

print("Yes") if sum_a >= h else print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import itertools
input = sys.stdin.readline


def read_values():
    return map(int, input().split())


def read_list():
    return list(read_values())


def read_lists(N):
    return [read_list() for n in range(N)]


def main():
    H, N = read_values()
    A = read_list()
    print("Yes" if sum(A) >= H else "No")


if __name__ == "__main__":
    main()

Submission status: Accepted

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

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:
def main():
    H, N = map(int, input().split())
    A = list(map(int, 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())
As = list(map(int, input().split()))

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

Submission status: Accepted

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

tot = sum(A)
if tot >= 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:
#!/usr/bin/env python3
import sys, math, itertools, collections, bisect
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8')
inf = float('inf') ;mod = 10**9+7
mans = inf ;ans = 0 ;count = 0 ;pro = 1

h,n=map(int,input().split())
A=list(map(int,input().split()))
A.sort(reverse=True)
S=sum(A)
if h<=S:
    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 H <= sum(A) else "No")

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 = 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()))
print(("No","Yes")[sum(A)>=H])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**6)
from math import floor,ceil,sqrt,factorial,log
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
from operator import itemgetter
from fractions import gcd
mod = 10 ** 9 + 7
 
#整数input
def ii(): return int(sys.stdin.readline().rstrip()) #int(input())
def mii(): return map(int,sys.stdin.readline().rstrip().split())
def limii(): return list(mii()) #list(map(int,input().split()))
def lin(n:int): return [ii() for _ in range(n)]
def llint(n: int): return [limii() for _ in range(n)]
#文字列input
def ss(): return sys.stdin.readline().rstrip() #input()
def mss(): return sys.stdin.readline().rstrip()
def limss(): return list(mss()) #list(input().split())
def lst(n:int): return [ss() for _ in range(n)]
def llstr(n: int): return [limss() for _ in range(n)]

h,n = mii()
arr = limii()

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

Submission status: Accepted

Solution code:
import sys
import math
import heapq
sys.setrecursionlimit(10**7)
INTMAX = 9223372036854775807
INTMIN = -9223372036854775808
DVSR = 1000000007
def POW(x, y): return pow(x, y, DVSR)
def INV(x, m=DVSR): return pow(x, m - 2, m)
def DIV(x, y, m=DVSR): return (x * INV(y, m)) % m
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def II(): return int(sys.stdin.readline())
def FLIST(n):
    res = [1]
    for i in range(1, n+1): res.append(res[i-1]*i%DVSR)
    return res

H,N=LI()
if H <= sum(LI()):
    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:
def main():
    import sys
    input = sys.stdin.readline

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

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:

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

sm = sum(A)
if sm >= 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 "No")

Submission status: Accepted

Solution code:
# coding: utf-8
h,n = map(int, input().split())
A = sum(map(int, input().split()))

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:

#gcdは3.4.3だとfractionsにある
from fractions import gcd
import math

from math import factorial as f

from math import ceil,floor,sqrt


import bisect
import re
import heapq


from copy import deepcopy
import itertools

from sys import exit

ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))


def main():
    h,n = mi()
    a = li()
    if h <= sum(a):
        print("Yes")
    else:
        print("No")

        



main()

Submission status: Accepted

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


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

Submission status: Accepted

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

Submission status: Accepted

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

sa = sum(A)

print('Yes' if H <= sa else 'No')

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(500000)

H, N, *A = map(int, read().split())

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

Submission status: Accepted

Solution code:
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces

h, n = na()
a = na()
s = sum(a)
if h > s:
    print("No")
else:
    print("Yes")

Submission status: Accepted

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

import array
from bisect import *
from collections import *
import fractions
import heapq
from itertools import *
import math
import random
import re
import string
import sys

H, N = map(int, input().split())
As = list(map(int, input().split()))
s = sum(As)
if s >= 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()]
if sum(a) >= 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()))
    if H <= sum(A):
        print("Yes")
    else:
        print("No")
if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin
import math
a,b = [int(x) for x in stdin.readline().rstrip().split()]
li = list(map(int,stdin.readline().rstrip().split()))
if sum(li) >= a:
    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:

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

tmp = sum(A)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
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 math

def makelist(n, m):
    return [[0 for _ in range(m)] for _ in range(n)]

# n = int(input())
# 
# s = input()

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

p = sum(A)
if p >= 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:
import sys

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

H, N = lr()
A = lr()
print('Yes' if sum(A) >= H else '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:
import math
import itertools
import fractions
import heapq
import collections
import bisect
import sys
import copy

sys.setrecursionlimit(10**9)
mod = 998244353
inf = 10**20

def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(): return [list(map(int, l.split())) for l in sys.stdin.readlines()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()

h,n = LI()
a = LI()

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

Submission status: Accepted

Solution code:
def examA():
    H,A = LI()
    ans = (H-1)//A+1
    print(ans)
    return

def examB():
    H, N = LI()
    A = LI()
    if H>sum(A):
        print("No")
    else:
        print("Yes")
    return

def examC():
    ans = 0
    print(ans)
    return

def examD():
    ans = 0
    print(ans)
    return

def examE():
    ans = 0
    print(ans)
    return

def examF():
    ans = 0
    print(ans)
    return

import sys,copy,bisect,itertools,heapq,math
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict,deque
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))
def LSI(): return list(map(str,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def SI(): return sys.stdin.readline().strip()
global mod,mod2,inf,alphabet
mod = 10**9 + 7
mod2 = 998244353
inf = 10**18
alphabet = [chr(ord('a') + i) for i in range(26)]

if __name__ == '__main__':
    examB()

"""

"""

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys, math
def input():
    return sys.stdin.readline()[:-1]
from itertools import permutations, combinations
from collections import defaultdict, Counter, deque
from math import factorial
from fractions import gcd
e = enumerate

sys.setrecursionlimit(10**7)
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 sys

h, n, *a = map(int, sys.stdin.read().split())

def main():
    return 'Yes' if sum(a) >= h else 'No'

if __name__ == '__main__':
    ans = main()
    print(ans)

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == '__main__':
    main()

# import sys
#
# sys.setrecursionlimit(10 ** 7)
#
# input = sys.stdin.readline
# rstrip()
# int(input())
# map(int, input().split())

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:

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

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

Submission status: Accepted

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

sm = sum(a)

if sm >= h:
    ans = "Yes"
else:
    ans = "No"

print(ans)

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

Submission status: Accepted

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

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

b = sum(a)

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

Submission status: Accepted

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

Submission status: Accepted

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

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


if h - sum(al) > 0:
    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:
    ans = "Yes"
else:
    ans = "No"
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

from collections import deque, defaultdict
import itertools as ite
import sys
import math
from decimal import *

sys.setrecursionlimit(1000000)

INF = 10 ** 18
MOD = 10 ** 9 + 7

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
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')