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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = input().split()
A = input().split()
H = int(x[0])
N = int(x[1])
a = 0
for i in range(N):
    a+=int(A[i])
if a>=H:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

if sum(A_list) >= 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=sum(map(int,input().split()))
print("Yes" if H-A<=0 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, _ = 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 = tuple(map(int,input().split()))
result = 0
for i in range(n):
  result += a[i]
if h <= result:
  print('Yes')
else:
  print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
h, n = [int(i) for i in sys.stdin.readline().split()]
a_ls = [int(i) for i in sys.stdin.readline().split()]
if sum(a_ls) >= h:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
# Initializing variables
monsterHP, specialMoves = map(int, input().split())
a = list(map(int, input().split()))
sum = 0

# Calculating if the raccoon can win without using the same move twice or more.
for i in range(specialMoves):
    sum += a[i]

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

# Check out my Youtube channel! https://www.youtube.com/channel/UCMOKVyAbTZOpKikTrX5dy_A

Submission status: Accepted

Solution code:
# Initializing variables
monsterHP, specialMoves = map(int, input().split())
a = list(map(int, input().split()))
sum = 0

# Calculating if the raccoon can win without using the same move twice or more.
for i in range(specialMoves):
    sum += a[i]

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

Submission status: Accepted

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

print(["No","Yes"][sum(A)>=H])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
H, N, *A = map(int, open(0).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()))
if H<=sum(a):print("Yes")
else: print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

main()

Submission status: Accepted

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

Submission status: Accepted

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

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

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

ans = sum(A)

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

Submission status: Accepted

Solution code:
kazu1 = list(map(int, input().split()))
kazu2 = list(map(int, input().split()))

if kazu1[0] <= sum(kazu2):
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
import math

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

a_sum = sum(a)

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

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline

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

damage = sum(A)

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

Submission status: Accepted

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

sortA=sorted(A)

for i in range(N):
    H-=sortA.pop()
    if(H <= 0):
        print('Yes')
        sys.exit()
print('No')

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.buffer.read#全部読み込むやつ
readline = sys.stdin.buffer.readline#1行読み込むやつ
readlines = sys.stdin.buffer.readlines#リストで読み込むらしい

H,N,*A = map(int,read().split())
S = sum(A)
if H <= S:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

d = 0
for i in L2:
    d += int(i)

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

Submission status: Accepted

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

SUM_A = sum(A)

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

Submission status: Accepted

Solution code:
#L, R = map(int,input().split())
H,N = map(int,input().split())
A = list(map(int,input().split()))
 
a = 0
for i in A:
  a += i
  
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()))
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_of_a = sum(a)
if h <= sum_of_a:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:


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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.buffer.readline
def getN():
    return int(input())
def getNM():
    return map(int, input().split())
def getlist():
    return list(map(int, input().split()))
import math
import heapq
from collections import defaultdict, Counter, deque
MOD = 10**9 + 7
INF = 10**15


def main():
    n, k = getlist()
    nums = getlist()
    if sum(nums) >= n:
        print("Yes")
    else:
        print("No")


if __name__ == '__main__':
    main()

"""
9999
3

2916
"""

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

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

n=sum(l)
if n>=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 = H - a[i]

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

Submission status: Accepted

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

A_list.sort()
sum_attack = sum(A_list)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:

l = list(map(int, input().split()))
a = list(map(int, input().split()))
if sum(a)>=l[0]:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

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

Submission status: Accepted

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

for i in P:
    H -= i
if H > 0:
    print('No')
else:
    print('Yes')

Submission status: Accepted

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

result = H - total_attack_damage
if result > 0:
	print("No")
elif result <= 0:
	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())
waza_list = [i for i in map(int,input().split())]

#全部一回ずつ使って倒せるかどうかじゃん？
if sum(waza_list) >= h:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

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

a = sorted(a)

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

for i in range(n):
	h = 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()))
A = sorted(A, reverse = True)

for a in A[:n] :
    h -= a

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

Submission status: Accepted

Solution code:
H, N = [int(x) for x in input().strip().split()]
print('YNeos'[sum([int(x) for x in input().split()])<H::2])

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

Submission status: Accepted

Solution code:
H, N = map(int, input().split())
skills_sum = sum(map(int, input().split()))
print("Yes" if H-skills_sum <= 0 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:
#!/usr/bin/env python3
# https://atcoder.jp/contests/abc153/tasks/abc153_b

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

Submission status: Accepted

Solution code:
line1 = input()
line2 = input()
h, n = line1.split(" ")
a_i = line2.split(" ")
sum_dame = sum(int(i) for i in a_i)
if sum_dame >= int(h):
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:

inputa = input()

h,n = inputa.split()
H=int(h)
N=int(n)
inputb=input()
Attacks=inputb.split()
Attacks.sort(reverse=True)
# print(Attacks)
cnt=0
maxlen=len(Attacks)
for i in range(N):
  H=H-int(Attacks[maxlen-i-1])
  cnt=cnt+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()))
suma=0
for i in range(n):
  suma+=a[i]
if suma>=h:
  print('Yes')
else:
  print('No')

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from fractions import gcd
# from datetime import date, timedelta
# from heapq import *
import heapq
import math
from collections import defaultdict, Counter, deque
from bisect import *
import itertools
import fractions
import sys
sys.setrecursionlimit(10 ** 7)
MOD = 10 ** 9 + 7
# input = sys.stdin.readline


def lcm(a, b):
    return a * b / fractions.gcd(a, b)


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

    # divisors.sort()
    return divisors


def factorize(n):
    fct = []  # prime factor
    b, e = 2, 0  # base, exponent
    while b * b <= n:
        while n % b == 0:
            n = n // b
            e = e + 1
        if e > 0:
            fct.append((b, e))
        b, e = b + 1, 0
    if n > 1:
        fct.append((n, 1))
    return fct


def is_prime(n):
    if n == 1:
        return False

    for k in range(2, int(math.sqrt(n)) + 1):
        if n % k == 0:
            return False

    return True


def primes(n):
    is_prime = [True] * (n + 1)
    is_prime[0] = False
    is_prime[1] = False
    for i in range(2, int(n**0.5) + 1):
        if not is_prime[i]:
            continue
        for j in range(i * 2, n + 1, i):
            is_prime[j] = False
    return [i for i in range(n + 1) if is_prime[i]]

def modpow(a, n, mod):
    res = 1
    while n > 0:
        if n & 1:
            res = res * a % mod
        a = a * a % mod
        n >>= 1
    return res


def modinv(a, mod):
    return modpow(a, mod - 2, mod)


def cnk(a, b):
    MOD = 10**9+7
    ret = 1
    for i in range(b):
        ret *= (a-i)
        ret %= MOD
        ret = ret * modinv(i+1, MOD) % MOD
    return ret


class UnionFind:
    def __init__(self, n):
        self.sz = [-1 for i in range(n)]

    # 検索
    def find(self, x):
        if self.sz[x] < 0:
            return x
        else:
            self.sz[x] = self.find(self.sz[x])
            return self.sz[x]

    # 併合
    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)
        if x == y:
            return False
        if self.sz[x] > self.sz[y]:
            x, y = y, x
        self.sz[x] += self.sz[y]
        self.sz[y] = x

    # 同じ集合に属するか判定
    def same(self, x, y):
        return self.find(x) == self.find(y)

    # xが含まれている集合のサイズを求める
    def size(self, x):
        return -self.sz[self.find(x)]


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())
Ali = [int(x) for x in input().split()]
sum = sum(Ali)
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_list) >= H:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
h = [int(i) for i in input().split(" ")]
h = h[0]
attacks = [int(i) for i in input().split(" ")]
if sum(attacks) >= 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:
x=input().split()
H=int(x[0])
N=int(x[1])
x=input().split()
s=0
for k in range(len(x)):
  s+=int(x[k])
if s>=H:
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
inp1 =input().split(" ")
HP,N= int(inp1[0]),int(inp1[1])

inp2 = input().split(" ")

ATK = 0
for x in range(N):
  ATK += int(inp2[x])
  
if HP <= ATK:
  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 = 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 = (input()).split(" ")
H=(int)(H)
N=(int)(N)
As = (input()).split(" ")
 
sum=0
 
for A in As:
  sum+=(int)(A)
  
if sum>=H:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
def get(text,n):
    ans = [""]*n
    i = 0
    for x in text:
        if x==" ":
            i = i + 1
        ans[i] = ans[i]+x
    return ans

hn = input()
H = int(get(hn,2)[0])
N = int(get(hn,2)[1])

a_text = input()
a = get(a_text,N)

s = 0
for i in range(N):
    s = s +  int(a[i])

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import math
def i():return int(sys.stdin.readline().replace("\n",""))
def i2():return map(int,sys.stdin.readline().replace("\n","").split())
def s():return str(sys.stdin.readline().replace("\n",""))
def l():return list(sys.stdin.readline().replace("\n",""))
def intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def lx():return list(map(lambda x:int(x)*-1,sys.stdin.readline().replace("\n","").split()))
def t():return tuple(map(int,sys.stdin.readline().replace("\n","").split()))

if __name__ == "__main__":pass
h, n = i2()
a = intl()
print("Yes" if h <= sum(a) else "No")

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

for a in AL:
    H -= a
    if H <= 0:
        print('Yes')
        exit(0)

print('No')

Submission status: Accepted

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

sum_=0

for i in range(len(li)):
  sum_+=li[i]

if n<=sum_:
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
import numpy as np

H, N = [int(i) for i in input().split()]
A = [int(a) for a in input().split()]

if np.sum(np.array(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, 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()))

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from itertools import combinations

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

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

Submission status: Accepted

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

import sys

def main():
    h, n = [int(x) for x in sys.stdin.readline().split()]
    atks = [int(x) for x in sys.stdin.readline().split()]

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

ans = "No"

for j in range(i[1]):
    i[0] -= a[j]
    if i[0] <= 0:
        ans = "Yes"
        break;

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np
from sys import stdin
from copy import deepcopy
from functools import reduce
from fractions import gcd
import math
import itertools
from collections import Counter
from itertools import chain  ##list(chain.from_iterable(l)) ##flatten
from heapq import heappush, heappop

"""
N = int(input())
A, B = map(int,input().split())
A = list(map(int,input().split())) ## 横一列
A = [int(input()) for _ in range(N)] ## 縦一列
lst = [list(map(int,input().split())) for i in range(M)] ## 二次元
"""

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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=[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())
print('NYoe s'[H<=sum(list(map(int,input().split())))::2])

Submission status: Accepted

Solution code:
h,n,*a=map(int,open(0).read().split())
print('YNeos'[sum(a)<h::2])

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

Submission status: Accepted

Solution code:
import math

inputs = input().split(" ")
health, moves_num = int(inputs[0]), int(inputs[1])

moves_inp = input().split(" ")
moves = [int(move) for move in moves_inp]

can_win = False

for move in moves:
    health -= move
    if health <= 0:
        can_win = True
        break
print("Yes" if can_win else "No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

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

a = []
a = map(int, input().split())
a_sum = sum(a)

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

Submission status: Accepted

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

SUM = sum(A)
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()))
sa = sum(a)

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

Submission status: Accepted

Solution code:
def InS(): return input()


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


def InI(): return int(input())


H, N = InL()

x = InL()

y = sum(x)

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

# x = -(-H // A)
# print(x)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
listA=[]

for i in range(2):
    try:
        listA.append(list(map(int, input().split())))
        #listA<-[1,2,2,3,1]
        #print(listA)
        #ここに逐次処理を書けばいいと思う。
    except:
        break;
        #または、quit(),os.exit()をして止める。

if sum(listA[1]) >= (listA[0])[0]:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
H, N = map(int, input().split(' '))
A = map(int, input().split(' '))
once = False
sum = 0
for a in A:
    sum += a
    if sum >= H:
        once = True
        break

if once: 
    print("Yes")
else : 
    print("No")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
line1 = input().rstrip().split(' ')
hit_point = int(line1[0])
N = int(line1[1])

line2 = input().rstrip().split(' ')
special_skills = map(int, line2)

total_attack_point = sum(special_skills)

print('Yes' if hit_point <= total_attack_point else 'No')