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

#print H, N, A

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Sun Jan 19 20:52:57 2020

@author: over-
"""

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

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

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

Submission status: Accepted

Solution code:
inp = input().rstrip().split(" ")
HP = int(inp[0])
N = int(inp[1])
inp = input().rstrip().split(" ")
for i in range(N):
  HP -= int(inp[i])
if HP <= 0:
  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()))

num = sum(a)

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

Submission status: Accepted

Solution code:
def num():
    return int(input())
def nums():
    return list(map(int,input().split()))

import itertools as iter
import math
import fractions
from functools import reduce

def lcm_base(x, y):
    return (x * y) // fractions.gcd(x, y)

def lcm(*numbers):
    return reduce(lcm_base, numbers, 1)

def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)

H,N = nums()
A = nums()
print("Yes" if sum(A)>=H else "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:
import numpy as np

HN=np.array(input().split(" "),dtype=np.int32)
H=HN[0]
N=HN[1]

A=np.array(input().split(" "),dtype=np.int32)

damage=np.sum(A)

if(H<=damage):
    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=h-a[i]
    if h<=0:
        print("Yes")
        exit()
print("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()))
total = 0
for i in range(n):
    total += a[i]
if total >= h:
    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()]

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

Submission status: Accepted

Solution code:
h, n = map(int, input().split())
L = list(map(int, input().split()))
all = 0
for i in range(n):
  all += L[i]
if all >= h:
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
a = input().split(" ")
a =[int(i) for i in a]
H = a[0]
N = a[1]

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

for i in b:
    H = H - i

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

Submission status: Accepted

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

for i in A:
    num += i

if num >= 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:
d = input().split(" ")
h = int(d[0])
n = int(d[1])
a = input().split(" ")
s = 0
for i in range(n):
	s += int(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()))

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

Submission status: Accepted

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

for i in A:
  H-=int(i)

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

tot = 0
for a in A:
    tot += a

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

Submission status: Accepted

Solution code:
#!python3.4.3

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

a = sorted(a, reverse=True)

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

Submission status: Accepted

Solution code:
def values():
  return [int(x) for x in input().split()]

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

Submission status: Accepted

Solution code:
# coding:UTF-8

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

if sum(skills) >= 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:
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,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()))

a.sort(reverse=True)
t = 0
for d in a:
    t += d
    if t >= h:
        print('Yes')
        exit()
print('No')

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
H, N = [int(i) for i in input().rstrip().split(' ')]
A = [int(i) for i in input().rstrip().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()))

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

Submission status: Accepted

Solution code:
import math

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

if sum(A)>=HP:
    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 = 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:
#! /usr/bin/env python
# -*- coding: utf-8 -*-

import pdb
import sys
F = sys.stdin

H,N = map(int,F.readline().split())
a = list(map(int,F.readline().rstrip().split()))
a_sum = 0
for num in a:
    a_sum += num

if a_sum >= H:
    print('Yes')
    sys.exit()

print('No')

Submission status: Accepted

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

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

Submission status: Accepted

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

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

for kk in range(b):
    a -= x[kk]

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

if sum >= h:
    win = True
else:
    win = False

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
first = input().split(' ')
health = int(first[0])
skills_count = int(first[1])

second = input().split(' ')
skills = [int(s) for s in second]

if sum(skills) < health:
  print("No")
else:
  print("Yes")

Submission status: Accepted

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

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

Submission status: Accepted

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

for a in A:
  h-=a
if h<=0:
  print('Yes')
else:
  print('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:
def main():
    H, N = list(map(int, input().split()))
    A = list(map(int, input().split()))

    A_sum = sum(A)

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

if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

main()

Submission status: Accepted

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

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

sa = sum(a)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
H, N = map(int, input().split())
A = list(map(int, input().split()))
A = sorted(A, reverse=True)
if H <= sum(A[0:N+1]):
  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():
    h, n = map(int, input().split(" "))
    hissatu = [int(s) for s in input().split(" ")]
    total = sum(hissatu)
    if h > total:
        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):
    print('No')
else:
    print('Yes')

Submission status: Accepted

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

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:
# -*- coding: utf-8 -*-

import sys
import math


debug = False

def log(text):
    if debug:
        print(text)

def parse_input(lines_as_string = None):

    global debug
    lines = []
    if lines_as_string is None:
        debug = False
        # for line in sys.stdin:
        #     lines.append(line)
        lines.append(input())
        lines.append(input())
    else:
        debug = True
        lines = [e for e in lines_as_string.split("\n")][1:-1]

    (h, n) = [int(e) for e in lines[0].split(" ")]
    a = [int(e) for e in lines[1].split(" ")]

    return (h, n, a)


def solve(h, n, a):

    total_a = sum(a)
    result = 'No'
    if h <= total_a:
        result = 'Yes'

    return result
    


def main():
    # 出力
    result = solve(*parse_input())
    if isinstance(result, list):
        for r in result:
            print("%s" % r, sep='')
    else:
        print("%s" % result, sep='')

if __name__ == '__main__':

    main()

Submission status: Accepted

Solution code:
from __future__ import print_function

import sys
input = sys.stdin.readline


def eprint(*args, **kwargs):
    print(*args, file=sys.stderr, **kwargs)
    return


# import re
# import array
# import copy
# import functools
# import operator

# import math
# import string
import fractions
# from fractions import Fraction
from fractions import gcd

# import collections
# import itertools
# import bisect

# import heapq
# from heapq import heappush
# from heapq import heappop
# from heapq import heappushpop
# from heapq import heapify
# from heapq import heapreplace
# from queue import PriorityQueue as pq
from queue import Queue

# from itertools import accumulate

# from collections import deque
# from collections import Counter

from operator import mul
from functools import reduce


# def lcm(n,m):
#     return int(n*m/gcd(n,m))


def coprimize(p, q):
    common = fractions.gcd(p, q)
    return (p // common, q // common)


def combinations_count(n, r):
    r = min(r, n - r)
    numer = reduce(mul, range(n, n - r, -1), 1)
    denom = reduce(mul, range(1, r + 1), 1)
    return numer // denom

# import random
# import time


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

m=sum(a)
if m>=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 = list(map(int, input().split()))
a = list(map(int, input().split()))
a.sort(reverse=True)

if sum(a[:n]) >= 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())
attacks = list(map(int,input().split()))

sa = sum(attacks)

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    H,N = map(int,input().split())
    A = list(map(int,input().split()))
    A = sorted(A,reverse=True)
    if H <= sum(A[:N]):
        print("Yes")
    else:
        print("No")

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

result="No"
s = 0
for i in a:
    s += i
    if s >= h:
        result = "Yes"
        break

print(result)

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

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys


def main():
    h = int(input().replace('\n','').split()[0])
    tmp = input().replace('\n','').split()
    a=0
    for i in tmp:
        a+=int(i)
    if a >= h:
        print("Yes")
    else:
        print("No")

if __name__ == '__main__':
    input = sys.stdin.readline
    main()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
h,n = map(int, input().split())
al = list(map(int, input().split()))

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

Submission status: Accepted

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

Submission status: Accepted

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



	

if __name__ == '__main__':
	main()

Submission status: Accepted

Solution code:
def resolve():
    import sys
    input = sys.stdin.readline
    
    H, N = map(int, input().split())
    A = list(map(int, input().split()))

    S = sum(A)
    # print(S)

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


if __name__ == "__main__":
    resolve()

Submission status: Accepted

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

a = input().split()


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

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

Submission status: Accepted

Solution code:
h,num = map(int,input().split(" "))
attack = list(map(int,input().split(" ")))
    
total = 0
for i in attack:
    total += i


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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/python3
# -*- coding: utf-8 -*-
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())
power = 0

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

for i in range(0, n):
  power += a[i]
  
if power >= 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,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(s) for s in input().split()])
attacks = [int(s) for s in input().split()]

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

Submission status: Accepted

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

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

S = sum(L)

# print(S)

if H <= S:
    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()]


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

Submission status: Accepted

Solution code:
from functools import reduce

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

# process
sum = reduce(lambda x, y: x+y, A)

# output
print("Yes" if H <= sum 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()))
if H <= sum(a):
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
table = list(map(int, input().split()))
table.sort(reverse=True)
if sum(table) >= a:
    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:
  ans = 'Yes'
else:
  ans = 'No'
  
print(ans)

Submission status: Accepted

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

sum = 0

for item in a:
    sum += item

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

Submission status: Accepted

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


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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
 
import math
import itertools
import sys
import copy
 
# 入力
#A, B, C, D = map(int, input().split())
#L = list(map(int, input().split()))
#S = list(str(input()))
#N = int(input())
#S = str(input())
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, n = map(int, input().split())
    a_list = list(map(int, input().split()))
    a_sum = sum(a_list)
    if h <= a_sum:
        print('Yes')
    else:
        print('No')


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

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

print(ans)

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
sys.setrecursionlimit(1000000000)
import math
from fractions import gcd
from itertools import count, permutations
from functools import lru_cache
from collections import deque, defaultdict
from pprint import pprint
ii = lambda: int(input())
mis = lambda: map(int, input().split())
lmis = lambda: list(mis())
INF = float('inf')
N1097 = 10**9 + 7

def meg(f, ok, ng):
    while abs(ok-ng)>1:
        mid = (ok+ng)//2
        if f(mid):
            ok=mid
        else:
            ng=mid
    return ok
#

def main():
    H,N=mis()
    A=lmis()
    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()))
A.sort(reverse=True)
if sum(A[:N]) >= H:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

sum = 0

for i in A_i:
    sum += i

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
hn=input().split(" ")
H=int(hn[0])
N=int(hn[1])
A=input().split(" ")
A=[int(s) for s in A]
#print(A)
total=0
for i in range(N):
  total+=A[i]
if H<=total:
  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, _ = 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:
def solve(H, weapons):
  # weapons are guranteed > 0
  if sum(weapons) < H:
    print('No')
  else:
    print('Yes')

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


H, N = iln()
weapons = iln()
solve(H, weapons)

Submission status: Accepted

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

Submission status: Accepted

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

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

A.sort(reverse=True)

i = 0
while H>0 and i <= N-1:
    H -= A[i]
    i += 1

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

Submission status: Accepted

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

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

s=sum(l)

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

else:
    print("No")

Submission status: Accepted

Solution code:
h,n=map(int,input().split())
s = sum(list(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()))
print("YNeos"[sum(a)<h::2])

Submission status: Accepted

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