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:
for i in range(2):
    if i == 0:
        input_val = list(map(int, input().rstrip().split()))
    else:
        power = list(map(int, input().rstrip().split()))

answer = 'Yes' if input_val[0] <= sum(power) else 'No'
print(answer)

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

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

Submission status: Accepted

Solution code:
import math
query=[int(x) for x in input().split()]
N = query[0]
K = query[1]
l=[int(x) for x in input().split()]
SUM=sum(l)
if N-SUM<=0:
    print("Yes")
else:
   print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
print('No' if int(input().split()[0])>sum(list(map(int, input().split()))) 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()))
atk=0
for i in range(len(a)):
    atk+=a[i]

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

Submission status: Accepted

Solution code:
H,N = map(int,input().split())
M = list(map(int,input().split()))
 
ans = 0       
for i in M:
    ans = ans + i
if H > ans:
    print("No")
else:
    print("Yes")

Submission status: Accepted

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

total = 0
for ai in a:
    total = total + ai

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

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 itertools
import sys
import math
import numpy as np
from collections import deque
from itertools import combinations
from functools import lru_cache
sys.setrecursionlimit(10**9)


def main():
    H,N = map(int,input().split())
    A = list(map(int,input().split()))
    A_sorted = sorted(A, reverse = True)

    sum = 0
    for a in A_sorted:
        sum += a
        if sum >= H:
            print("Yes")
            exit()

    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:
from numpy import *

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

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

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

Submission status: Accepted

Solution code:
# coding: utf-8
# submission # - User: herp_sy
# https://atcoder.jp/contests/
#
# lang: Python3 (3.4.3)

import math
import statistics
import numpy as np
import queue

h,n = map(int, input().split())
a = np.array(sorted(list(int(i) for i in input().split()), \
      reverse = True))
print('Yes' if a.sum() >= h else 'No')

Submission status: Accepted

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

Submission status: Accepted

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

for i in map(int, input().split()):
  h -= i
if h <= 0 :
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
In1 = input().split()
h = int(In1[0])
n = int(In1[1])
ith = input().split()[0:n]
count = 0
for x in ith:
    h -= int(x)
    if h <= 0:
        break
if h > 0:
    print("No")
else:
    print("Yes")

Submission status: Accepted

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
# coding: utf-8

raccoon = input().split(" ")
H = int(raccoon[0])
N = int(raccoon[1])
atack = input().split(" ")
ans = 0
for i in atack:
	ans += int(i)
if ans >= 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())
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:
H, N = map(int, input().split())
A = list(map(int, input().split()))
A_total = 0
for i in A:
    A_total += i
if A_total >= 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 h<=A:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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

sum_a = 0

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
hp, deathblow_num, *attack_point = map(int, open(0).read().split())

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys

I = list(map(int, input().split()))
A_i = list(map(int,input().split()))
A_i = [i for i in A_i if 1 <= i and i <= 10**4]
H = I[0]
N = I[1]

if not 1 <= H or not H <= 10**9 or not 1 <= N or not N <= 10**5:
    print("error")
    sys.exit()

A_i = sorted(A_i, reverse=True) # 降順ソート
A_i = A_i[:N]
A = sum(A_i)

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

Submission status: Accepted

Solution code:
def attack(h, n, arr):
    h -= sum(arr)
    if h <= 0:
        return 'Yes'
    else:
        return 'No'

if __name__ == "__main__":
    h, n = map(int, input().split())
    arr = list(map(int,input().split()))
    print(attack(h, n, arr))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
h,n = map(int,raw_input().strip().split())
a = map(int,raw_input().strip().split())
summ = sum(a)
if summ-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:
Input = input().split(" ")
H = int(Input[0])
N = int(Input[1])
Input2 = input().split(" ")
skils = [int(A) for A in Input2]
enablepower = sum(skils)
if (H<=enablepower):
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
import math
h, n = map(int, input().split())
A = input().split()
sum = 0;
for a in A:
    sum += int(a)

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

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
from bisect import bisect

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

H, N = MAP()
A = LIST()

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

Submission status: Accepted

Solution code:
HN=input()
HN_list=HN.split()
H=int(HN_list[0])
N=int(HN_list[1])
A=input()
A_list=A.split()
aaa=map(int, A_list)
A_sum=sum(aaa)
if A_sum>=H:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

# スペース区切りの整数の入力
h, n = map(int, input().split())

# n個の要素の入力
l = 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())
list_A = [int(x) for x in input().split()]

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

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

Submission status: Accepted

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

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

for x in An:
    H = H - x
    if H <= 0:
        print('Yes')
        exit()

print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
h,n=map(int,input().split())
A=tuple(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())) 
A.sort(reverse=True)
for i in range(len(A)):
    if H>0:
        H=H-A[i]
    else:
        break
if H<=0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin, stdout

def main():
	H, N = (int(x) for x in stdin.readline().split())
	moves = [int(dmg) for dmg in stdin.readline().split()]
	if sum(moves) >= H:
		stdout.write("Yes")
	else:
		stdout.write("No")

if __name__ == "__main__":
	main()

Submission status: Accepted

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

for i in a:
    h = h-i
if h <= 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
li_a = input().split()

li_b = input().split()

li_a = [int(i) for i in li_a]
i = 0
li_b = [int(i) for i in li_b]

i = li_a[1]
for j in range(i):
    li_a[0] -= li_b[j]

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

Submission status: Accepted

Solution code:
import numpy as np

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

if A.sum() >= 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()))
if h <= sum(a):
    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:
h,n = map(int,input().split())
a = list(map(int,input().split()))
sum = 0
for i in range(0,n,1):
    sum = sum + a[i]
if sum>h or sum==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("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())
s=sum(map(int, input().split()))
print('Yes' if s >= a else '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=input().split()
H=int(a[0])
N=int(a[1])
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:
#AtCorder Common Raccoon vs Monster

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    H,N = map(int, input().split())
    An = list(map(int, input().split()))
    ans = "No"
    if sum(An) >= H: ans = "Yes"
    print(ans)
    return

if __name__=="__main__":
    main()

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

Submission status: Accepted

Solution code:
import sys
# s = sys.stdin.readlines()
inputs = sys.stdin.readline()
A = sys.stdin.readline()
inputs = inputs.split()
H, N = int(inputs[0]), int(inputs[1])
A = A.split()

A_sum = 0
for i in range(len(A)):
    A_sum += int(A[i])

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

summery = 0

for x in a:
	summery += x

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

Submission status: Accepted

Solution code:
from sys import stdin

H,N=map(int,stdin.readline().rstrip().split())
A=list(map(int,stdin.readline().rstrip().split()))
print("Yes" if H-sum(A)<=0 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:
#!/usr/bin/python
# -*- coding: UTF-8 -*-
# atcoder contest 153:B
h,n = input().split()
n = int(n)
h =int(h)

nums = input().split()
res = 0

for i in range(len(nums)):
    res = res + int(nums[i])

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

Submission status: Accepted

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

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

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 h > sum(a):
    print("No")

else:
    print("Yes")

Submission status: Accepted

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

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

total_damage = sum(A)

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
hp, _ = map(int, input().split(" "))
s = sum(map(int, input().split(" ")))
print("Yes" if (hp - s) <= 0 else "No")

Submission status: Accepted

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

Submission status: Accepted

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

HA=input().split()
H=int(HA[0])
N=int(HA[1])

sum=0

T=input().split()

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


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

Submission status: Accepted

Solution code:
data1=input().split()
data2=[int(x) for x in input().split()]
HP=int(data1[0])
Nu=int(data1[1])
if sum(data2)<HP:
  print("No")
else:
  print("Yes")

Submission status: Accepted

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

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

Submission status: Accepted

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

attack = 0
for i in na :
    attack = attack + i

if(hp <= attack):
    ans = 'Yes'
else:
    ans = 'No'

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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:
"""
author : halo2halo
date : 4, Feb, 2020
"""

import sys

# import itertools
# import math

# import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

H, N,*A = map(int, read().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()))

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
input_line = input()
temp = input_line.split()
H = int(temp[0])
N = int(temp[1])

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

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

Submission status: Accepted

Solution code:
from sys import stdin
h,n = map(int,stdin.readline().split())
l = list(map(int,stdin.readline().split()))
for u in l:
	h -= u
	if h<=0: print("Yes"); break
if h>0: print("No")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

A   =input().split()

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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(hitpoint,hissatsu_num,hissatsu_attack):
    for damage in hissatsu_attack:
        hitpoint -= int(damage)
    if hitpoint <= 0:
        return "Yes"
    else:
        return "No"
 
if __name__ == "__main__":
    inp1 = input().split()
    hitpoint = int(inp1[0])
    hissatsu_num = int(inp1[1])
    inp2 = input().split()
    inp2.sort(reverse=True)
    print(main( hitpoint , hissatsu_num , inp2))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
H, N = map(int, input().split(" "))
sum_A = sum(map(int, input().split()))
print("Yes") if H <= sum_A else print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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=(int(x) for x in input().split())
a=list(int(y) for y in input().split())
if sum(a)<H:
    print('No')
else:
    print('Yes')

Submission status: Accepted

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

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


main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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()))
sum = 0

for i in a:
  sum += i
  
if sum >= h:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
H, N = map(int, input().split())
lis = list(map(int, input().split()))
if sum(lis) >= 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:
from sys import stdin

def main():
    n,m = map(int,stdin.readline().split())
    l = list(map(int,stdin.readline().split()))
    aco = 0
    for i in l:
        aco+=i
    if n<= aco:
        print("Yes")
    else:
        print("No")

main()

Submission status: Accepted

Solution code:
from sys import stdin
import math

def main():
    H,A = map(int,stdin.readline().split())
    arr = [int(x) for x in stdin.readline().split()]
    res = 0
    for i in range(A):
        res += arr[i]
    if(res >= H):
        print("Yes")
    else:
        print("No")
        
main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(100000) 
H, N = map(int, input().split())
List = list(map(int, input().split()))
A = 0

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


def calc_atack(H, A, counter =0):
    if H - A <= 0:
        return('Yes')
    else:
        return('No')

print(calc_atack(H, A))

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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