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

Submission status: Accepted

Solution code:
#B
H,N=map(int,input().split())
A=list(map(int,input().split()))
print(['No','Yes'][H<=sum(A)])

Submission status: Accepted

Solution code:
H,A=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 solve(h, n, a_list):
    if sum(a_list) >= h:
        return "Yes"
    else:
        return "No"


def main():
    h, n = map(int, input().split())
    a_list = list(map(int, input().split()))
    res = solve(h, n, a_list)
    print(res)


def test():
    assert solve(10, 3, [4, 5, 6]) == "Yes"
    assert solve(20, 3, [4, 5, 6]) == "No"
    assert solve(210, 5, [31, 41, 59, 26, 53]) == "Yes"
    assert solve(211, 5, [31, 41, 59, 26, 53]) == "No"


if __name__ == "__main__":
    test()
    main()

Submission status: Accepted

Solution code:
from sys import stdin

if __name__ == '__main__':
    h, n = [int(x) for x in stdin.readline().rstrip().split()]
    A = [int(x) for x in stdin.readline().rstrip().split()]
    total = sum(A)
    if h <= total:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
h, 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()))

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin
#n = int(stdin.readline().rstrip())
#l = list(map(int, stdin.readline().rstrip().split()))
h,n = map(int, stdin.readline().rstrip().split())
As = list(map(int, stdin.readline().rstrip().split()))
#S = [list(map(int, stdin.readline().rstrip().split())) for _ in range(h)]#hの定義を忘れずに

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

print(ans)

Submission status: Accepted

Solution code:
H, N = [int(i) for i in input().split()]
at_list = [int(i) for i in input().split()]
at = 0
for i in range(len(at_list)):
    at += at_list[i]
if H <= at:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

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

if hp <= sum(arr):
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

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


for a in range(len(A)):
    H = H - A[a]

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

Submission status: Accepted

Solution code:
h,n=map(int,input().split())
a=map(int,input().split())
A=list(a)
c=0
for i in range(n):
 c+=A[i]
if h<=c:
 print("Yes")
else:
 print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

A.sort()

power=sum(A)

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

Submission status: Accepted

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

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


if __name__ == '__main__':
    main()

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 print("No")

Submission status: Accepted

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

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

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

Submission status: Accepted

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

s = sum(A)

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

Submission status: Accepted

Solution code:
h, n = map(int, input().split())
damage = list(map(int, input().split()))
damage.sort(reverse=True)
ans = "No"
for i in range(n):
    h -= damage[i]
    if h <= 0:
        ans = "Yes"
print(ans)

Submission status: Accepted

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

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

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

Submission status: Accepted

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

ans = 0
for i in A:
    ans += i

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

Submission status: Accepted

Solution code:
h, n = map(int, input().split())
a_array = map(int, input().split())
for a in a_array:
    h -= a
print("No" if h > 0 else "Yes")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

ans = "No"
total = 0
for i in range(N):
    total += A[i]
if total >= H:
    ans = "Yes"

print(ans)

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()) # 複数の数字を変数に格納
List = list(map(int,input().split())) # 複数の数字をリストに格納

attack = 0

for i in range(N):
    attack += List[i]
    
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()))

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
def input():
    return sys.stdin.readline()[:-1]

H,N = map(int,input().split(' '))
l = list(map(int, input().split()))
t = 0
for i in range(N):
    t += l[i]

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

Submission status: Accepted

Solution code:
ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))

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

Submission status: Accepted

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

damage = 0

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
inputs = sys.stdin.readlines()

h, n = map(int, inputs[0].split())
A = list(map(int, inputs[1].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()))

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

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

Submission status: Accepted

Solution code:
def main():
    h,n=map(int,input().split())
    a = list(map(int,input().split()))
    t=0
    for i,aa in enumerate(a):
        t+=aa
        if t >= h:
            print('Yes')
            return
    print('No')
if __name__=='__main__':
    main()

Submission status: Accepted

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

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

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
# Keyence 2020 A
si = lambda: input()
ni = lambda: int(input())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))

h,n=nm()
a=nl()
if sum(a)>=h:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
h,n=map(int,input().split())
A=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 = sorted([int(i) for i in input().split()],reverse=True)
#print(A)

for a in A:
    h -= a
    if h <= 0:
        print('Yes')
        exit()
print('No')

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == '__main__':
    resolve()

Submission status: Accepted

Solution code:
import bisect
import numpy as np
import math
import itertools
def main():
    H, N = map(int, input().split())
    A = list(map(int, input().split()))
    if sum(A) >= H:
        print("Yes")
    else:
        print("No")
    return 0

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


def main():
    h, n = map(int, input().split())

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

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


main()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
H,N=map(int,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 = list(map(int, input().split(" ")))
As = list(map(int, input().split(" ")))

if sum(As) / h >= 1:
    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()))

S=sum(A)

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

Submission status: Accepted

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

Submission status: Accepted

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

A = sorted(A, reverse=True)

if H <= sum(A[:N]):
    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()]

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

Submission status: Accepted

Solution code:
from sys import stdin


def fetch_one_line():
    return stdin.readline().rstrip()


def fetch_int_input():
    return [int(s) for s in fetch_one_line().split()]


def fetch_inputs(times):
    return [fetch_one_line() for _ in range(times)]


def fetch_int_inputs(times):
    return [[int(s) for s in fetch_one_line()] for _ in range(times)]


def fetch_ints_inputs(times):
    return [fetch_int_input() for _ in range(times)]


H, N = fetch_int_input()
attacks = fetch_int_input()

answer = ["No", "Yes"]

print(answer[int(H <= sum(attacks))])

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    b, c = map(int, input().split())
    a = [int(i) for i in input().split()]
    sum = 0

    for i in a:
        sum = sum + i

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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()]
s = 0
for a in A:
    s += a
if h - s <= 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:
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()))

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

Submission status: Accepted

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

if sum(li)>=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,n = map(int,input().split())
hList = list(map(int,input().split()))

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

Submission status: Accepted

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

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

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

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

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()))
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:
a, b = map(int, input().split())
s = sum([int(x) for x in input().split()])

print("Yes" if (a <= s) else "No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

sum=0
for a in A:
    sum+=a

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

Submission status: Accepted

Solution code:
# coding: utf-8

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

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

Submission status: Accepted

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


DEBUG = True
dprint = print if DEBUG else lambda *x : x

H, N = [int(str) for str in input().strip().split()]
A = [int(str) for str in input().strip().split()]

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
 
if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
 
 
H,A=map(int,input().split())

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

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

Submission status: Accepted

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

A_sum = sum(A)

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

resolve()

Submission status: Accepted

Solution code:

h, n = map(int, input().split())
a = list(map(int, input().strip().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()))
damage = 0
for i in range(0,n):
    damage += a[i]
if damage < 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("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:
#!/usr/bin/env python3

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

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

Submission status: Accepted

Solution code:
# coding=utf-8
# Date: 2020-01-08
# Author: lee215

get = lambda: int(raw_input().strip())
getl = lambda: raw_input().strip()
gets = lambda: map(int, raw_input().strip().split())
getss = lambda n: [gets() for _ in xrange(n)]


H, N = gets()
A = gets()
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())
print('Yes' if sum(A)>=H else 'No')

Submission status: Accepted

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

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

sm = 0

for tmp in a:
    sm+=tmp

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdout
printn = lambda x: stdout.write(str(x))
inn = lambda : int(input())
inl   = lambda: list(map(int, input().split()))
inm   = lambda:      map(int, input().split())
ins = lambda : input().strip()
DBG = True # and False
BIG = 999999999
R = 10**9 + 7

def ddprint(x):
  if DBG:
    print(x)

h,n = inm()
a = inl()
if sum(a)>=h:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
def InputToInt():
    A = input().split()
    for i in range(len(A)):
        A[i] = int(A[i])
    return A
    
if __name__ == '__main__':
    H, N = InputToInt()
    A = InputToInt()
    if sum(A) >= H:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin
#from collections import deque
#from math import ceil


def ii(): return int(stdin.readline())


def fi(): return float(stdin.readline())


def mi(): return map(int, stdin.readline().split())


def fmi(): return map(float, stdin.readline().split())


def li(): return list(mi())


def lsi():
    x=list(stdin.readline())
    x.pop()
    return x


def si(): return stdin.readline()


def sieve(x):
    a=[True]*(x+1)
    sq=floor(sqrt(x))
    for i in range(3, sq+1, 2):
        if a[i]:
            for j in range(i*i, x+1, i):
                a[j]=False
    if x>1:
        p=[2]
    else:
        p=[]
    for i in range(3, x+1, 2):
        if a[i]:
            p.append(i)
    return p
#vowel={'a', 'e', 'i', 'o', 'u', 'y', 'A', 'E', 'I', 'O', 'U', 'Y'}
#pow=[1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, 16777216, 33554432, 67108864, 134217728, 268435456, 536870912, 1073741824, 2147483648, 4294967296, 8589934592, 17179869184, 34359738368, 68719476736, 137438953472, 274877906944, 549755813888, 1099511627776, 2199023255552, 4398046511104, 8796093022208, 17592186044416, 35184372088832, 70368744177664, 140737488355328, 281474976710656, 562949953421312, 1125899906842624, 2251799813685248, 4503599627370496, 9007199254740992, 18014398509481984, 36028797018963968, 72057594037927936, 144115188075855872, 288230376151711744, 576460752303423488, 1152921504606846976, 2305843009213693952, 4611686018427387904, 9223372036854775808]
############# CODE STARTS HERE #############
n, m=mi()
a=li()
print('No' if sum(a)<n else '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:
# print('input >>')
H, N = map(int,(input().split()))
A = list(map(int,(input().split())))

ans = 'Yes' if sum(A) >= H else 'No'
# print('-----output-----')
print(ans)

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

print("No")

Submission status: Accepted

Solution code:
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")


if __name__ == '__main__':
    main()

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

if a - sum(nlist) <= 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
def main():
    h, n = [int(x) for x in input().split()]
    sps = [int(x) for x in input().split()]

    total = sum(sps)

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

if __name__ == "__main__":
    main()

Submission status: Accepted

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


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