Problem:


Score : 200 points

Problem Statement

Raccoon is fighting with a monster.

The health of the monster is H.

Raccoon can use N kinds of special moves. Using the i-th move decreases the monster's health by A_i.
There is no other way to decrease the monster's health.

Raccoon wins when the monster's health becomes 0 or below.

If Raccoon can win without using the same move twice or more, print Yes; otherwise, print No.

Constraints

1 \leq H \leq 10^9

1 \leq N \leq 10^5

1 \leq A_i \leq 10^4

All values in input are integers.

Input

Input is given from Standard Input in the following format:

H N
A_1 A_2 ... A_N

Output

If Raccoon can win without using the same move twice or more, print Yes; otherwise, print No.

Sample Input 1

10 3
4 5 6

Sample Output 1

Yes

The monster's health will become 0 or below after, for example, using the second and third moves.

Sample Input 2

20 3
4 5 6

Sample Output 2

No

Sample Input 3

210 5
31 41 59 26 53

Sample Output 3

Yes

Sample Input 4

211 5
31 41 59 26 53

Sample Output 4

No



Sample input:
10 3
4 5 6


Sample output:
Yes

Submission status: Accepted

Solution code:
H,N=map(int,input().split())
a=[0]*10**5
a=list(map(int,input().split()))

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

Submission status: Accepted

Solution code:
list = input().split(" ")
H = int(list[0])
skill = input().split(" ")
skill = [int(i) for i in skill]

sum = 0
for i in skill:
    sum = sum + i

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

if H - Sum <= 0:
    print("Yes")
elif H - Sum > 0:
    print("No")

Submission status: Accepted

Solution code:
H, _ = map(int, input().split())
l = sum(list(map(int, input().split())))

print('Yes' if l >= H else 'No')

Submission status: Accepted

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

def solve():
    H, N = list(map(int, input().split()))
    As = list(map(int, input().split()))
    if H <= sum(As):
        print("Yes")
    else:
        print("No")


if __name__ == "__main__":
    solve()

Submission status: Accepted

Solution code:
h, _, *a = map(int, open(0).read().split())
print("Yes" if sum(a) >= h else "No")

Submission status: Accepted

Solution code:
h,n =map(int,input().split())
alist = list(map(int,input().split()))
alist2 = sorted(alist)
a  = sum(alist2[0:n])
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()))
b=0
b=sum(a)
if b>=h:
  print("Yes")
elif b<h:
  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())
deathblows = list(map(int, input().split()))

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

Submission status: Accepted

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

Submission status: Accepted

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

for i in range (n):
  b+=a[i]

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

Submission status: Accepted

Solution code:
from math import ceil

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

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

Submission status: Accepted

Solution code:
from sys import stdin
import math

h, n = [int(x) for x in stdin.readline().rstrip().split()]
a = [int(x) for x in stdin.readline().rstrip().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())
s=sum(map(int,input().split()))
if s<h:
  print('No')
else:
  print('Yes')

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')
    break
else:
  print('No')

Submission status: Accepted

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

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

Submission status: Accepted

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

if (sum(B[:N]) >= 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('No')
else:
  print('Yes')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def solve():
    H, K = map(int, input().split())
    A = list(map(int, input().split()))
    return 'Yes' if H <= sum(A) else 'No'

print(solve())

Submission status: Accepted

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


def main():
    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:
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 = input().split()

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

if (sum(skill_list) < 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:
helth, num = map(int,input().split())
power = [int(x) for x in input().split()]

if sum(power) >= helth:
    print("Yes")
elif sum(power) < helth:
    print("No")

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

hi = sum(a)

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

Submission status: Accepted

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

Submission status: Accepted

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

damsum = int(sum(dams))

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

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, *a = map(int, open(0).read().split())

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
def judge(physical , deathblow , deathblow_list):
    for death in deathblow_list:
        physical = physical - death
    return physical

def main():
    monster_physical , deathblow = map(int , input().split())
    deathblow_list = list(map(int , input().split()))
    remaining = judge(monster_physical , deathblow , deathblow_list)
    if remaining <= 0:
        print("Yes")
    else:
        print("No")

if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from sys import stdin

# S,T = stdin.readline().rstrip().split()
H,N = [int(x) for x in stdin.readline().rstrip().split()]
s = list(map(int,input().split()))

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

Submission status: Accepted

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

for i in range(n):
    sum_attack += a[i]

if sum_attack >= h:
    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()))

b = sum(a)

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

Submission status: Accepted

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

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 range(len(A)):
    H = H - A[i]
    if H <= 0:
        break
if H <= 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

def judge(config , info):
    config = config.split()
    monster_physical = int(config[0])
    deathblow = int(config[1])
    
    info = info.split()
    
    deathblow_num = 0
    for num in info:
        deathblow_num = deathblow_num + int(num)
    
    if monster_physical <= deathblow_num:
        print("Yes")
    else:
        print("No")
    
def main():
    configration = input()
    information = input()
    
    judge(configration , information)
    
if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
input_list = input().split( )

for i in (range(len(input_list))):
  input_list[i] = int(input_list[i])

input_sum = sum(input_list)

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

Submission status: Accepted

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

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

if H > 0:
    ans = "No"
    
print(ans)

Submission status: Accepted

Solution code:
H,N = map(int,input().split())
data = list(int(i) for i in input().split())
data_s = sum(data)
if H <=data_s:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
h,n = list(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:
import numpy as np

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

attack = sum(a)

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

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=map(int, input().split())
A=list(map(int, input().split()))
i=0
while i < len(A) and H>0:
    H=H-A[i]
    i=i+1
if H>0:
    print("No")
else:
    print("Yes")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

atk = 0
for i in range(b):
    atk = atk + c[i]

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

Submission status: Accepted

Solution code:
A,B=map(int,input().split())
C=list(input().split())
count= 0
for i in range (B):
	count=count+int(C[i])
if count>=A:
	print("Yes")
else: print("No")

Submission status: Accepted

Solution code:
A,B=map(int,input().split())
C=list(input().split())
count= 0
for i in range (B):
 count=count+int(C[i])
if count>=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:
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:
# -*- coding: utf-8 -*-
"""
Created on Tue Mar  3 23:56:09 2020

@author: Kanaru Sato
"""

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

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

    sum_attack = sum(A)

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

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
h, n = map(int, input().split())
aListSum = sum(list(map(int, input().split())))
print("YNeos"[h - aListSum > 0::2])

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

A = sorted(A,reverse=True)

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin

def main():
    input = stdin.readline

    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,a = [int(x) for x in input().rstrip().split()]
l=[int(x) for x in input().rstrip().split()]

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
h,n = input().split()
a = input().split()
sum = 0
for i in a:
  sum += int(i)

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

Submission status: Accepted

Solution code:
H, N = tuple(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())
damage = list(map(int,input().split()))
#print(damage)
damage.sort(reverse=True)
sum=0
for i in range(N):
    sum+=damage[i]
    if sum>=H:
        print("Yes")
        break
    elif i==N-1:
        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 (sum(a) >= h):
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
h,_ = map(int,input().split())
a = sum(map(int,input().split()))
print((h>a)*"No" or "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 h <= sum(a) else "No"
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
count = []
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()))
for i in range(n):
  h -= a[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()))
print('Yes' if sum(a) >= h else '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())
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 = sorted(map(int, input().split()))

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
num = list(map(int,input().split()))
num_list = list(map(int,input().split()))

sum = 0

for i in range(0,num[1]):
  sum = num_list[i] + sum
  
if sum >= num[0]:
  ans = "Yes"
elif sum < num[0]:
  ans = "No"
  
print(ans)

Submission status: Accepted

Solution code:
import math
from fractions import gcd

import numpy as np
import scipy as scp

# 入力の受け取り
h,n = map(int,input().split())
arrA = np.array(input().split(),dtype=np.int64)

atack = sum(arrA)
if atack>=h:
    ans = "Yes"
else:
    ans = "No"
# ans = "Yes" or "No"
print(ans)

Submission status: Accepted

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

#Aを大きい順に並べ替え
A.sort(reverse=True)

#大きい方からNこの合計がH以上ならYes
sum=0
for i in range(0,N):
    sum = sum + A[i]

if sum>=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, 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())
A=map(int,input().split())
B=sum(A)
ans='Yes'
if B<H:
  ans='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:
H,N=map(int,input().split())
A=input().split()
B=[]
for i in range(N):
  a=int(A[i])
  B.append(a)
if sum(B)>=H:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
MOD = 10**9 + 7
INF = float('INF')

def main():
    h, n = list(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:
# https://atcoder.jp/contests/abc153/tasks/abc153_b
import sys
sys.setrecursionlimit(12345678)
import itertools
from collections import Counter
from collections import defaultdict
from collections import deque
import bisect
from heapq import heappush, heappop


def main():
    h, n = map(int, input().split())
    al = list(map(int, input().split()))
    print('Yes' if h <= sum(al) else 'No')
    return 


if __name__ == '__main__':
    main()

Submission status: Accepted

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

if B >= 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:
import math

class Culuculation():
  H = 0
  N = 0
  A = []
  
  def __init__(self):
    self.H, self.N = (int(x) for x in input().split(' '))
    #self.A = [int(x) for x in input().split(' ')]
    for x in input().split(' '):
      self.A.append(int(x))
    
  def culuculation(self):
    print('Yes' if self.H <= sum(self.A) else 'No')
    
def main():
  tmp = Culuculation()
  tmp.culuculation()

if __name__=='__main__':
  main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
hp, n = map(int, input().split())
att = sum(list(map(int, input().split())))

if hp > att: 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 sys


def solve():
    readline = sys.stdin.buffer.readline
    mod = 10 ** 9 + 7
    h, n = list(map(int, readline().split()))
    a = sum(list(map(int, readline().split())))
    print("Yes" if a >= h else "No")


if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10 ** 7)
read = sys.stdin.buffer.read 
input = sys.stdin.buffer.readline
def inputS(): return input().rstrip().decode()
readlines = sys.stdin.buffer.readlines 

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

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

Submission status: Accepted

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

YES = "Yes"  # type: str
NO = "No"  # type: str


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


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    H = int(next(tokens))  # type: int
    N = int(next(tokens))  # type: int
    A = [int(next(tokens)) for _ in range(N)]  # type: "List[int]"
    solve(H, N, A)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#ABC153B
import sys
H, n = map(int, sys.stdin.readline().split())
A = map(int, sys.stdin.readline().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()))
all=sum(a)
if h>all:
  ans='No'
else:
  ans='Yes'
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def main():
    H, N, *A = map(int, open(0).read().split())
    print("No" if sum(A) < H else "Yes")
    return


main()

Submission status: Accepted

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