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:
#!/usr/bin/env python3
import sys

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


def solve(H: int, N: int, A: "List[int]"):
    return YES if sum(A) >= H else 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]"
    print(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()))
sum = 0
for i in range(n):
    sum = sum + a[i]
if sum < h:
    print("No")
else:
    print("Yes")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
H, N = map(int, input().split())
A = 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:
x = input()
y = input()
hp = int(x.split()[0])
attack_num = int(x.split()[1])
attack_list = y.split(' ')
sum = 0

for i in attack_list:
    i = int(i)
    sum = sum + i
if sum >= hp:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

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

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

Submission status: Accepted

Solution code:
h,n = map(int,input().split())
sp = map(int,input().split()) 
if h > sum(sp):
  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())
List = list(map(int,input().split())) #配列という複数の変数に代入
if sum(List) >= 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()))
print("Yes" if sum(a)>=H else "No")

Submission status: Accepted

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

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


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


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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

T = 0
for a in A: #for i in A だとAの要素を繰り返す
    T += a
if T >= H:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys


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


if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
stdin = open(0).read().split('\n')
H, N = map(int,stdin[0].split())
A = map(int,stdin[1].split())
print('Yes' if sum(A)>=H else 'No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#--Common Raccoon vs Monster

hp, number = map(int, input().split(" "))
attack = [int(i) for i in input().split(" ")]

total = sum(attack)

if (total >= hp):
  print("Yes")
  exit()
else:
  pass

for i in range(number):
  damage = total - (attack[i])
  if (damage >= hp):
    print("Yes")
    exit()
  else:
    pass

print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def f(h, n, a):
    if sum(a) >= h:
        print('Yes')
    else:
        print('No')

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

Submission status: Accepted

Solution code:
HP, skills = map(int, input().split())
damage = list(map(int, input().split()))

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

H = b[0]
N = b[1]

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

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

Submission status: Accepted

Solution code:
"""
int(input())
map(int,input().split())
list(map(int,input().split()))

"""

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# coding: utf-8
import sys

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

H, N = lr()
A = lr()
bl = sum(A) >= H
print('Yes' if bl else '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 = list(map(int, input().split()))
for i in a:
    h -= i
    if h <= 0:
        print("Yes")
        exit()
print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
h,n=map(int,input().split())
A=[int(_) for _ 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()))
sum = sum(A)

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

Submission status: Accepted

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

if a<H:
    print("No")

else:
    print("Yes")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import os

def main():
	monster_hp, num = map(int, input().split())
	Attack_point_list = list(map(int, input().split()))
	if monster_hp <= sum(Attack_point_list):
		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()))
B = sum(A)
if B >= H:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
H,N = map(int,input().split())
lis = list(map(int,input().split()))
a = sum(lis)
if 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('Yes' if H<=sum(A) else "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:
#入力:N(int:整数)
def input1():
	return int(input())

#入力:N,M(int:整数)
def input2():
	return map(int,input().split())

#入力:[n1,n2,...nk](int:整数配列)
def input_array():
	return list(map(int,input().split()))


H,A=input2()
a=input_array()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
base = input().split()
h = int(base[0])
skill = input().split()
int_list = []
for i in skill:
    int_list.append(int(i))
if h>sum(int_list):
    print("No")
else:
    print("Yes")

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
H,N=map(int,input().split())
A=list(map(int,input().split()))
a=sum(A)
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()))
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(sorted(A, reverse=True)[:N]):
  print('No')
else:
  print('Yes')

Submission status: Accepted

Solution code:
def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**7)
    from collections import Counter, deque
    #from collections import defaultdict
    from itertools import combinations, permutations, accumulate, groupby
    #from itertools import product
    from bisect import bisect_left,bisect_right
    from heapq import heapify, heappop, heappush
    from math import floor, ceil
    #from operator import itemgetter

    #inf = 10**17
    #mod = 10**9 + 7

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
h,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 = 0
for i in a:
    a_sum += i

print("Yes") if a_sum >= h else print("No")

Submission status: Accepted

Solution code:
H, N = input().split()
H = int(H)
#print(H)
#H, N = input().split()
lis = list(map(int,input().split()))
A =sum(lis)
if H > A:
    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:
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 sys
input = sys.stdin.readline
import math
def print_ans(H, N, ar):
    """Test Case
    >>> print_ans(10, 3, [4, 5, 6])
    Yes
    >>> print_ans(20, 3, [4, 5, 6])
    No
    >>> print_ans(210, 5, [31, 41, 59, 26, 53])
    Yes
    >>> print_ans(211, 5, [31, 41, 59, 26, 53])
    No
    """
    if H <= sum(ar):
        print("Yes")
    else:
        print("No")


if __name__ == '__main__':
    H, N = map(int, input().rstrip().split())
    ar = list(map(int,input().rstrip().split()))
    print_ans(H, N, ar)

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
enemy,skill=map(int,input().split())
damage=map(int,input().split())
if(enemy-sum(damage)<=0):
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

answer = 'Yes' if H - sum(A) <= 0 else 'No'

print(answer);

Submission status: Accepted

Solution code:
# 0405の分もやる

# ABC153-C
if False:
    N,K=map(int,input().split())
    H=[int(i) for i in input().split()]
    H.sort(reverse=True)
    print(sum(H[K:]))

# ABC153-D
if False:
    H=int(input())
    cnt=1
    ans=0
    while H>1:
        ans+=cnt
        H//=2
        cnt*=2
    print(ans+cnt)

# ABC153-A
if False:
    # ceil関数
    def ceil(a,b): #ceil(a/b)
        return (a+b-1)//b

    H,A=map(int,input().split())
    print(ceil(H,A))

# ABC153-B
H,N=map(int,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())
Total = sum(map(int,input().split()))

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    h,n=INTM()
    a=LIST()
    if sum(a)>=h:
        print('Yes')
    else:
        print('No')
if __name__ == '__main__':
    do()

Submission status: Accepted

Solution code:
x,y  = map(int, input().split())
li = list(map(int,input().split()))
s=0
for i in range(len(li)):
    s+=li[i]
if s>=x:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
p,q= input().split()
a,b =(int(p), int(q))
s = input().split()
total = 0
for i in range(b):
    total += int(s[i])
if total >= 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:
def main():
    hp, num = map(int, input().split())
    a = list(map(int, input().split()))
    attack = sum(a)

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

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:
#template
from collections import Counter
def inputlist(): return [int(j) for j in input().split()]
H,N = inputlist()
A = inputlist()
s = sum(A)
if H <= s:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

    have=list(map(int,input().split()))
    cal=0

    for i in have:
        cal+=i
        if cal>=H:
            print("Yes")
            return

    print("No")
    return


main()

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


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

Submission status: Accepted

Solution code:
#B
HN = input().split(' ')
H = int(HN[0])
N = int(HN[1])
Ai = input().split(' ')
power = 0
for s in range(N):
    power += int(Ai[s])
if power >= 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("No")
else:print("Yes")

Submission status: Accepted

Solution code:
def q2():
    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')


if __name__ == '__main__':
    q2()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
H ,N = map(int, input().split())
A = [0]*N
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:
H,N=map(int,input().split());A=sum(map(int,input().split()));print('YNeos'[H>A::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,A=input().split()
H=int(H)
A=int(A)
l=input().split()
l=[int(i) for i in l]
S=sum(l)
if H<=S:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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


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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

winner = False
if H <= sum(A):
    winner = True

if winner:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
H,N = (int(x) for x in input().split())
a = list(map(int,input().split()))

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#coding:utf-8
import sys,os
sys.setrecursionlimit(10**6)
write = sys.stdout.write
dbg = (lambda *something: print(*something)) if 'TERM_PROGRAM' in os.environ else lambda *x: 0
def main(given=sys.stdin.readline):
    input = lambda: given().rstrip()
    LMIIS = lambda: list(map(int,input().split()))
    II = lambda: int(input())
    XLMIIS = lambda x: [LMIIS() for _ in range(x)]
    YN = lambda c : print('Yes') if c else print('No')
    MOD = 10**9+7

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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