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:
def wczytaj_liste():
    ciag = input()
    rozdzielona_lista = ciag.split()
    odp = []
    for wyraz in rozdzielona_lista:
        liczba = int(wyraz)
        odp.append(liczba)
    return odp

def Raccon_vs_Monster():
    H, N = wczytaj_liste()
    ruchy = wczytaj_liste()
    suma_obrazen = sum(ruchy)
    if suma_obrazen >= H:
        print('Yes')
    else:
        print('No')

Raccon_vs_Monster()

Submission status: Accepted

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

a.sort(reverse=True)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
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:
#n = int(input())
#s = input()
n,m = map(int,input().split())
da = list(map(int,input().split()))

su = 0
for i in da:
    su += i
if su >= n:
    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()))
if sum(L) >= 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())
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 A:
  sum += i
print("Yes" if (sum >= H) else "No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S1 = list(map(int, input().split()))
S2 = list(map(int, input().split()))

H = S1[0]

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
h, n = map(int, sys.stdin.readline().split())
a = []
a.extend(map(int, sys.stdin.readline().split()))

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

Submission status: Accepted

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

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

ans = 0

# range(n) = range(0,n,1) => start, end, skip
#for i in range(n):
#    ans += a[i]

#配列aの中身を最後までループ、中身はそのままiで計算できる
for i in a:
    ans += i

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

Submission status: Accepted

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

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

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import math
import string
import itertools
import fractions
import heapq
import collections
import re
import array
import bisect
import sys
import random
import time
inf = 10**9


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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

if H <= sum(a_list):
  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)
output = 'Yes' if H <= sum(A[0:N]) else 'No'
print(output)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def check(cms, hp):
	cms.sort(reverse=True)
	tls = 0
	for cm in cms:
		tls += cm
		if tls >= hp:
			return 'Yes'
	return 'No'

hp, _ = map(int, input().split())
attack_commands = list(map(int, input().split()))
print(check(attack_commands, hp))

Submission status: Accepted

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

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

DR = [1, -1, 0, 0]
DC = [0, 0, 1, -1]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
     
def main():
    H, N = LI()
    A = LI()
    if H - sum(A) > 0:
        print('No')
    else:
        print('Yes')

main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
input1 = input().split(' ')
input2 = input().split(' ')
h = int(input1[0])
n = int(input1[1])
a = input2
for i in range(n):
  h = h - (int(a[i]))
  if h <= 0:
    print('Yes')
    break
if h > 0:
  print('No')

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
line=input()
data=input()
line=line.split()
data=data.split()
num=int(line[0])
for i in range(int(line[1])):
    num-=int(data[i])
if num>0:
    print("No")
else:
    print("Yes")

Submission status: Accepted

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

# for i in range(N):
#     A.append(int(input()))
A = [int(s) for s in input().split()]

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    h, n = [int(i) for i in input().split()]
    num = [int(i) for i in input().split()]
    for j in range(n):
        h -= num[j]
        if h <= 0:
            return "Yes"
    if h > 0:
        return "No"

print(main())

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
h, n = map(int, input().split())
a = input().split()
b = 0
def has_duplicates(seq):
    return len(seq) != len(set(seq))

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
H, N = map(int, input().split())
A = [int(s) for s in 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()))
total = sum(A)
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()))

count = 0

for attack in A:
    count += attack

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

Submission status: Accepted

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

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, _ = list(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:
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()))
sum=0
for a in A:
    sum += a
print("Yes") if sum >= H else print("No")

Submission status: Accepted

Solution code:
val = input()
h, n = [int(x) for x in val.split()]
val = input()
a = [int(x) for x in val.split()]
 
sum = sum(a)
if h - sum <= 0:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

if h <= sum(a_list):
  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:
tmp = input().split(" ")
H = int(tmp[0])
N = int(tmp[1])
tmp = input().split(" ")
A = [int(i) for i in tmp]
A.sort(reverse = True)
if sum(A[:N])<H:
  print("No")
else:
  print("Yes")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
h,n = [int(x) for x in input().split()]
a = [int(x) for x in input().split()]
a.sort()
while(h>0):
  if len(a)==0:
    print("No")
    sys.exit()
  h-=a.pop()
print("Yes")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

a_i = input().split()
count = 0
attack = 0
while count < N:
   attack += int(a_i[count])
   count += 1
  
if attack >= H:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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


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

Submission status: Accepted

Solution code:
A = []
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:

def main():
  h, n = input().split(" ")
  moves = input().split(" ")
  h = int(h)
  
  for x in moves:
    h -= int(x)
  
  if h > 0:
    print("No")
  else:
    print("Yes")
    
if __name__ == "__main__":
  main()

Submission status: Accepted

Solution code:
H, N=map(int,input().split())
List=list(map(int,input().split()))
res=0
for i in List:
  res += i
if H <= res:
  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 = map(int,input().split())

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
l1 = input().strip().split()
h = int(l1[0])
n = int(l1[1])
asum = sum([int(i) for i in input().strip().split()])
if h <= asum:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
h,n=map(int,input().split())
print('YNeos'[sum([int(i)for i in input().split()])<h::2])

Submission status: Accepted

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

    return 

if __name__=="__main__":
    main()

Submission status: Accepted

Solution code:
HN = input().split(' ')
H = int(HN[0])
N = int(HN[1])
A = input().split(' ')

sum = 0
for i in range(N):
  sum += int(A[i])
  
if sum >= H:
  print("Yes")
else:
  print("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]"):
    return H <= sum(i for i in A)


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]"
    if solve(H, N, A):
        print("Yes")
    else:
        print("No")

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
arr1 = str(input())
arr = arr1.split()
health = int(arr[0])
nAttack = int(arr[1])

totalAttack = str( input() )
tAttack = totalAttack.split()

total = 0

for i in tAttack:
    total += int(i)

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

Submission status: Accepted

Solution code:
h, n = map(int, input().split())
a = input()
alst = []
for i in a.split():
    alst.append(int(i))
if sum(alst) >= int(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:
import sys
import socket

hostname = socket.gethostname()

if hostname == 'F451C':
    sys.stdin = open('b1.in')


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


def read_str_list():
    return input().split()


def read_int():
    return int(input())


def read_str():
    return input()


def main():
    H, N = read_int_list()
    A = read_int_list()
    res = 'Yes' if sum(A) >= H else 'No'
    print(res)

main()

Submission status: Accepted

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

Submission status: Accepted

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

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


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


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

# Declaring variables
h = int(h)
n = int(n)
sum = 0

# Calculating the sum
for i in range(n):
    sum += a[i]

# Judging if the raccoon can win without using the same move twice or more.
if sum >= 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):
  print('Yes')
else:
  print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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:
import math

Health, AttachType = map(int, input().split())
AttachPoint = map(int, input().split())
sumAttackPoint = sum(AttachPoint)

if sumAttackPoint >= Health:
    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(len(A)):
  B += A[i]

if H > B:
  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:

a,b = map(int,input().split())
c = list(map(int,input().split()))
# c_list = list(c)
# c_list = [int(s) for s in c ]
count = 0
for i in range (0,b):
    count += c[i]

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

total = sum(a)

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

Submission status: Accepted

Solution code:
import sys
lines = sys.stdin.readlines()
h, n = [int(i) for i in lines[0].rstrip().split(" ")]
a = [int(i) for i in lines[1].rstrip().split(" ")]

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

Submission status: Accepted

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

Submission status: Accepted

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

judge = 'Yes' if sum(A_list) >= H else 'No'

print(judge)

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# abc 153
import sys
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
read = sys.stdin.buffer.read
sys.setrecursionlimit(10 ** 7)

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

A.sort(reverse=True)

for a in A:
    H -= a

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = [list(map(int,input().split())) for l in range(2)]

if sum(a[1]) >= a[0][0]:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

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

#mod=10**9+7
# rstrip().decode('utf-8')
# map(int,input().split())
#import numpy as np


def main():
	h,n=map(int,input().split())
	A=list(map(int,input().split()))
	ans="Yes"
	
	if h>sum(A):
		ans="No"
	
	print(ans)
	
	

if __name__ == "__main__":
	main()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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('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:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


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


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
# -*-coding-utf-8-*-
H, N = map(int, input().split())
Ai = list(map(int, input().split()))

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

Submission status: Accepted

Solution code:
import sys

def main():

    # sys.stdin = open('input153b.txt')

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

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

H,A = map(int,input().split(" "))
Alist=[]
Alist =  list(map(int,input().split(" ")))

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

Submission status: Accepted

Solution code:
import sys


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


if __name__ == '__main__':
    solve()

Submission status: Accepted

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

Submission status: Accepted

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

max_damage = 0

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

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

Submission status: Accepted

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

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

else:
    print('No')

Submission status: Accepted

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

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

for i in sa:
  H = H - i

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

Submission status: Accepted

Solution code:
h, n = input().split()
H = int(h)
N = int(n)
a = [int(i) for i in input().split()]
a.sort(reverse=True)
A = 0
for i in range(N):
    A = A + a[i]
if A >= H:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

def main():
    N,K = map(int,input().split())
    A = list(map(int,input().split()))
    at = sum(A)
    if at >= N:
        print("Yes")
    else:
        print("No")
    
if __name__ == "__main__":
    main()

Submission status: Accepted

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

#A = [0]*N
A = [int(i) for i in input().split()]

#print(A)

if np.sum(A) >= 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()))

damage = 0

for i in range(len(A)):
    damage += A[i]

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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())
numbers = map(int, input().split())
s = sum(numbers)
if s>=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()))

sum_A = sum(A)

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

Submission status: Accepted

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

for i in li:
	spell += int(i)

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

Submission status: Accepted

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

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