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 resolve():
    h, n = map(int, input().split())
    a = list(map(int, input().split()))
    total = 0
    for i in a:
        total += i
    if total >= h:
        print('Yes')
    else:
        print('No')
resolve()

Submission status: Accepted

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

Submission status: Accepted

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

if h <= sum(l):
    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 H <= total:
    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:
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 = [int(i) for i in input().split()]

# print(sum(A))

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

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

if(kougeki>=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(A)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = list(map(int,input().split()))
H = a[0]
N = a[1]
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 = [int(item) for item in input().split()]
A_list = [int(item) for item in input().split()]

skill_sum = sum(A_list)

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

Submission status: Accepted

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


if __name__ == '__main__':
    solve()

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

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

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
l = list(map(int, input().split()))
sum = sum(l)
print("Yes" if 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:
# coding: utf-8
from fractions import gcd 
from functools import reduce
# my functions here!
def pin(type=int):
    return map(type,input().split())
#input
H,N =pin()
A = sum(pin())
#solution
ans = "No" if A<H else "Yes"
#output
print(ans)

Submission status: Accepted

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

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

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

Sum = sum(a)

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

Submission status: Accepted

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

Submission status: Accepted

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

Sum = sum(A)
if h-Sum>0:
    print('No')
else:
    print('Yes')

Submission status: Accepted

Solution code:
h, n = map(int, input().split())
l = sum(list(map(int, input().split())))
print("Yes") if h <= l 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 = [int(n) for n in input().split()]
A = [int(n) for n 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()))
max_A=sum(A)
if max_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()))

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

Submission status: Accepted

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

for i in a:
    total += i

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

Submission status: Accepted

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

a=[int(i) for i in input().split()]
asum=sum(a)

if h-asum<=0:
    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):
        res = "Yes"
    else: res = "No"
    print(res)

if __name__ == "__main__":
    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:
import sys

input = sys.stdin.readline

ri = lambda: int(input())
rs = lambda: input().rstrip()
ril = lambda: list(map(int, input().split()))
rsl = lambda: input().rstrip().split()
ris = lambda n: [ri() for _ in range(n)]
rss = lambda n: [rs() for _ in range(n)]
rils = lambda n: [ril() for _ in range(n)]
rsls = lambda n: [rsl() for _ in range(n)]

h, n = ril()
ls = ril()
if h <= sum(ls):
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# import numpy as np
# import math
# import copy
# from collections import deque
import sys
input = sys.stdin.readline
# sys.setrecursionlimit(10000)


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

    tot = sum(A)

    if tot >= H:
        res = 'Yes'
    else:
        res = 'No'

    print(res)



main()

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

#整数値入力 1文字の入力
def input_one_number():
    return int(input())

#整数値龍力　複数の入力
def input_multiple_number():
    return map(int, input().split())

#整数値龍力　複数の入力(配列)
def input_multiple_number_as_list():
    return list(map(int, input().split()))

#整数値龍力　複数の入力(配列で1つずつ渡される)
def input_multiple_number_as_list_sep(N):
    ins = []
    for i in range(N):
        ins.append(input())
    return ins

#2次元配列入力
def input_map():
    return [list(map(int,list(input()))) for i in range(h)]

#リスト出力
def print_list(list):
    print(*list)
    return

#2次元配列出力
def print_map(maplist):
    for i in maplist:print(*i, sep='')
    return

#素数生成
def generate_primenums():
    n = 100
    primes = set(range(2, n+1))
    for i in range(2, int(n**0.5+1)):
        primes.difference_update(range(i*2, n+1, i))
    primes=list(primes)
    return primes

def memo():
    a=[0]*5
    b=a  #良くない配列のコピー
    b2=a[:]  #1次元のときはコピーはこれで良い
    a[1]=3
    print('b:{}, b2:{}'.format(b,b2))  #b:[0, 3, 0, 0, 0], b2:[0, 0, 0, 0, 0]
    
    import copy
    a= [[0]*3 for i in range(5)] #2次元配列はこう準備、[[0]*3]*5だとだめ
    b=copy.deepcopy(a)  #2次元配列はこうコピーする
    
    #内包表記奇数のみ
    odd=[i for i in range(100) if i%2==1] #[1, 3, 5, 7, 9, 11, 13, 15, 17, 19]

    #二部探索
    import bisect
    a = [1, 2, 3, 5, 6, 7, 8, 9]
    b=bisect.bisect_left(a, 8)

    #combinations、組み合わせ、順列
    from itertools import permutations, combinations,combinations_with_replacement,product
    a=['a','b','C']
    print(list(permutations(a)))
    print(list(combinations(a,2)))
    print(list(combinations_with_replacement(a,3)))


#階乗
def kaijo(n):
    import math
    return math.factorial(n)

#選び方（コンビネーション nCr）
def num_combination(n,r):
    import math
    return math.factorial(n) // math.factorial(n - r)


#最大公約数、最小公倍数
def calc_gcd(a,b):
    import fractions
    GCD=fractions.gcd(a,b)
    lcm=a*b//gcd
    return gcd,lcm

#複数の最大公約数
def calc_gcd_list(l):
    gcd = l[0]
    for i in range(1, N):
        gcd = fractions.gcd(gcd, l[i])
    return gcd

#各桁の和
def sum_digit(n):
    sum = 0
    while n > 0:
        sum += n%10
        n //= 10
    return sum

H,N = input_multiple_number()
lst_a = input_multiple_number_as_list()

damage = 0
for a in lst_a:
    damage += a

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

p = 0

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

Submission status: Accepted

Solution code:
import math
import numpy as np

if __name__ == "__main__":
  _h, _n = map(int, input().split())
  a_list = [int(x) for x in input().split()]

  a_list = np.array(a_list)
  s = np.sum(a_list)
  if _h > s:
    print("No")
  else:
    print("Yes")

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math
N = input().split()
N = [int(i) for i in N]
A = input().split()
A = [int(i) for i in A]
#print(N, A)
s = sum(A)
if(N[0] > s):
    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()]
sum=0
for i in range(n):
	sum+=a[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()))
sums = sum(a)
if sums >= 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 = map(int, input().split())

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

Submission status: Accepted

Solution code:
H, A = map(int,input().split())
Alist = list(map(int,input().split()))
if sum(Alist) >= 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]"):
    A.sort()
    print(YES if H<=sum(A[len(A)-N:]) else 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:
n = input()    
m = n.split()
p = [int(i) for i in m] 
n = input()    
m = n.split()
q = [int(i) for i in m] 
b = 0
for i in q:
    b = b + i
if b < p[0]:
    print("No")
else:
    print("Yes")

Submission status: Accepted

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

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

flag=False

for aa in a:
    h-=aa
    if h <= 0:
        flag=True
        break
    
if flag:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
skill=list(map(int,input().split()))
total=0
for i in skill:
    total += i
if total>=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:
# -*- coding: utf-8 -*-
H, N = map(int, input().split())
A_list = list(map(int, input().split()))

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
h_a = list(map(lambda x: int(x), input().split(" ")))
H = h_a[0]
As = list(map(lambda x: int(x), input().split(" ")))
a_sum = sum(As)
if a_sum >= H:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
HP, N = map(int, input().split())
Attack = list(map(int, input().split()))
total = sum(Attack)

if (total >= HP):
    judge = 'Yes'
else:
    judge = 'No'

print(judge)

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10**7)
INF = 10 ** 18
MOD = 10 ** 9 + 7
def LI(): return list(map(int, sys.stdin.readline().split()))
def II(): return int(sys.stdin.readline())
def LS(): return list(map(list, sys.stdin.readline().split()))
def S(): return list(sys.stdin.readline())[:-1]

def main():
    h, n = LI()
    a_s = LI()
    if sum(a_s) < h:
        print("No")
    else:
        print("Yes")

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
from pprint import pprint

def solve(h, n, a):
    print("Yes" if sum(a) >= h else "No")

if __name__ == '__main__':
    h, n = map(int, sys.stdin.readline().strip().split(" "))
    a = map(int, sys.stdin.readline().strip().split(" "))
    solve(h, n, a)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N, _ = map(int, input().split())
waza = sum(map(int, input().split()))

if N > waza:
  print("No")
else:
  print("Yes")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
h, n = list(map(int, input().split()))
a = list(map(int, input().split()))
a = a[::-1]
while len(a) > 0 and h > 0:
    h -= a.pop()
if h <= 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
h, n =map(int,input().split())
li = list(map(int,input().split()))
li.sort(reverse=True)
if sum(li[:n+1]) >=h:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

if(res>=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()))
su=0
for i in a:
  su+=i
if su>=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()]

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

Submission status: Accepted

Solution code:
h,n = map(int, input().split())
a = map(int, input().split())
a = sorted(a, reverse=True)
for x in a:
    h=h-x
    if h<=0:
        break
print('Yes' if h<=0 else 'No')

Submission status: Accepted

Solution code:
import sys

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

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

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

Submission status: Accepted

Solution code:
import unittest


class TestB(unittest.TestCase):
    def test_1(self):
        self.assertEqual(think(10, [4, 5, 6]), 'Yes')

    def test_2(self):
        self.assertEqual(think(20, [4, 5, 6]), 'No')

    def test_3(self):
        self.assertEqual(think(210, [31, 41, 59, 26, 53]), 'Yes')

    def test_4(self):
        self.assertEqual(think(211, [31, 41, 59, 26, 53]), 'No')


def solve():
    h, a = read()
    result = think(h, a)
    write(result)


def read():
    h, n = read_int(2)
    return h, read_int(n)


def read_int(n):
    return read_type(int, n, sep=' ')


def read_float(n):
    return read_type(float, n, sep=' ')


def read_type(t, n, sep):
    return list(map(lambda x: t(x), read_line().split(sep)))[:n]


def read_line(n=0):
    if n == 0:
        return input().rstrip()
    else:
        return input().rstrip()[:n]


def think(h, a):
    return 'Yes' if sum(a) >= h else 'No'


def write(result):
    print(result)


if __name__ == '__main__':
    # unittest.main()
    solve()

Submission status: Accepted

Solution code:
#B - Common Raccoon vs Monster
H,N = map(int,input().split())
A = list(map(int, input().split()))

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

Submission status: Accepted

Solution code:
# import itertools
# import math


def solve(H, N, A):
    if (sum(A) >= H):
        return 'Yes'
    return 'No'


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

# P = []
# S = []
# for i in range(N):
#     pp, ss  = map(int, input().split())
#     P.append(pp)
#     S.append(ss)

print(solve(H, N, A))

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

Submission status: Accepted

Solution code:
# 2020/01/26
# AtCoder Beginner Contest 153 - A

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

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

if sum >= h:
    ans = "Yes"
else:
    ans = "No"

# Output
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 = [int(i) for i in input().split()]
An = [int(i) for i in input().split()]
print("Yes" if sum(An) >= H  else "No")

Submission status: Accepted

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

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

for damage in skill_damage:
    hp -= damage

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

print("Yes" if H <= sum(lstM) else 'No')

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
H,N = map(int,input().split())
lst = list(map(int,input().split()))
if (sum(lst) >= 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]"):
    print(YES if H <= sum(A) else 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:
# coding: utf-8

H, N = [int(x) for x in input().split()]

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

S = sum(A)

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

Submission status: Accepted

Solution code:
def main():
    h,n = map(int,input().split())
    a_lst = list(map(int,input().split()))
    for attack in a_lst:
        h -= attack
    if h <= 0:
        print("Yes")
    else:
        print("No")



if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
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())
lst = list(map(int, input().split()))
print('Yes' if sum(lst) >= h else 'No')

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
data = list(map(int, input().split()))
lst = list(map(int, input().split()))

if data[0] <= sum(lst):
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin
h, n = map(int, stdin.readline().rstrip().split())
waza = list(map(int, stdin.readline().rstrip().split()))
if h <= sum(waza):
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
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:
H,N=map(int,input().split())
A=list(map(int,input().split()))
flag=False
for i in range(N):
   H-=A[i]
   if H<=0:
      flag=True
      break
if flag:
   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)
    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:
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:
# -*- coding: utf-8 -*-
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:
import math

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

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

Submission status: Accepted

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


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

Submission status: Accepted

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

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

# 強い順に並び替え
A.sort()

for a in A:
    H -=a
    if H<=0:
        print("Yes")
        exit()
    else:
        continue

print("No")

Submission status: Accepted

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