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

Submission status: Accepted

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

a.sort(reverse=True)

s=0

for i in range(k):
  s+=a[i]

print('Yes' if s >= n else 'No')

Submission status: Accepted

Solution code:
#k = int(input())
#s = input()
#a, b = map(int, input().split())
#s, t = map(str, input().split())
#l = list(map(int, input().split()))

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'
        break
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

solve()

Submission status: Accepted

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

sum_a = sum(a)

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

Submission status: Accepted

Solution code:


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


def read_ints():
    return list(map(int, input().strip().split(' ')))


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


if __name__ == '__main__':
    print(solve())

Submission status: Accepted

Solution code:
h, m = 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,*A = map(int, open(0).read().split())
print('Yes' if H - sum(A) <= 0 else 'No')

Submission status: Accepted

Solution code:
h,n=input().split()
h=int(h)
n=int(n)
#print(h,n)
arr=list(map(int,input("\r").strip().split()))[:n] 
sum=0;
for i in range(0,n):
  #  print(arr[i])
    sum+=arr[i]
  
if sum>=h:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.buffer.readline
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))

h, n = MAP()
a = LIST()

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

Submission status: Accepted

Solution code:
# abc153_b.py
# https://atcoder.jp/contests/abc153/tasks/abc153_b

# B - Common Raccoon vs Monster /
# 実行時間制限: 2 sec / メモリ制限: 1024 MB
# 配点 : 200点

# 問題文
# アライグマはモンスターと戦っています。
# モンスターの体力は Hです。
# アライグマは N種類の必殺技を使うことができ、i 番目の必殺技を使うとモンスターの体力を Ai減らすことができます。 
# 必殺技を使う以外の方法でモンスターの体力を減らすことはできません。
# モンスターの体力を 0以下にすればアライグマの勝ちです。
# アライグマが同じ必殺技を 2度以上使うことなくモンスターに勝つことができるなら Yes を、できないなら No を出力してください。

# 制約
#     1≤H≤109
#     1≤N≤105
#     1≤Ai≤104
#     入力中のすべての値は整数である。

# 入力
# 入力は以下の形式で標準入力から与えられる。
# H N
# A1 A2 ... AN

# 出力

# アライグマが同じ必殺技を 2度以上使うことなくモンスターに勝つことができるなら Yes を、できないなら No を出力せよ。

# 入力例 1
# 10 3
# 4 5 6

# 出力例 1
# Yes

# 例えば 2番目と 3 番目の必殺技を使うことで、モンスターの体力を 0以下にできます。

# 入力例 2
# 20 3
# 4 5 6

# 出力例 2
# No

# 入力例 3
# 210 5
# 31 41 59 26 53

# 出力例 3
# Yes

# 入力例 4
# 211 5
# 31 41 59 26 53

# 出力例 4
# No


global FLAG_LOG
FLAG_LOG = False


def log(value):
    # FLAG_LOG = True
    # FLAG_LOG = False
    if FLAG_LOG:
        print(str(value))


def calculation(lines):
    # S = lines[0]
    # N = int(lines[0])
    H, N = list(map(int, lines[0].split()))
    values = list(map(int, lines[1].split()))
    # values = list(map(int, lines[2].split()))
    # values = list()
    # for i in range(N):
    #     values.append(int(lines[i]))
    # valueses = list()
    # for i in range(N):
    #     valueses.append(list(map(int, lines[i+1].split())))

    if sum(values) < H:
        result = 'No'
    else:
        result = 'Yes'

    return [result]


# 引数を取得
def get_input_lines(lines_count):
    lines = list()
    for _ in range(lines_count):
        lines.append(input())
    return lines


# テストデータ
def get_testdata(pattern):
    if pattern == 1:
        lines_input = ['10 3', '4 5 6']
        lines_export = ['Yes']
    if pattern == 2:
        lines_input = ['20 3', '4 5 6']
        lines_export = ['No']
    if pattern == 3:
        lines_input = ['210 5', '31 41 59 26 53']
        lines_export = ['Yes']
    if pattern == 4:
        lines_input = ['211 5', '31 41 59 26 53']
        lines_export = ['No']
    return lines_input, lines_export


# 動作モード判別
def get_mode():
    import sys
    args = sys.argv
    global FLAG_LOG
    if len(args) == 1:
        mode = 0
        FLAG_LOG = False
    else:
        mode = int(args[1])
        FLAG_LOG = True
    return mode


# 主処理
def main():
    import time
    started = time.time()
    mode = get_mode()
    if mode == 0:
        lines_input = get_input_lines(2)
    else:
        lines_input, lines_export = get_testdata(mode)

    lines_result = calculation(lines_input)

    for line_result in lines_result:
        print(line_result)

    # if mode > 0:
    #     print(f'lines_input=[{lines_input}]')
    #     print(f'lines_export=[{lines_export}]')
    #     print(f'lines_result=[{lines_result}]')
    #     if lines_result == lines_export:
    #         print('OK')
    #     else:
    #         print('NG')
    # finished = time.time()
    # duration = finished - started
    # print(f'duration=[{duration}]')


# 起動処理
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() ) )

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()))
b = 0
for i in range(N):
  b +=A[i]
if(H<=b):
  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:
x, y = map(int, input().split())
z = map(int, input().split())
if sum(z) >= x:
    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 = map(int, input().split())
if H - sum(A) <= 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

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

Submission status: Accepted

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


def II():
    return int(sys.stdin.readline())


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


def LI():
    return list(map(int, sys.stdin.readline().split()))


def main():
    H, N = MI()
    A = LI()

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


main()

Submission status: Accepted

Solution code:
v, n = map(int, input().split())
arr = sorted(map(int, input().split()))
print("Yes") if sum(arr[-n:]) >= v else print("No")

Submission status: Accepted

Solution code:
h,n=map(int,input().split());print('NYoe s'[h<=sum(list(map(int,input().split())))::2])

Submission status: Accepted

Solution code:
h, n = 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 = input().split()
a = list(map(str,input().split()))
attack = 0
for i in range(int(n)):
    attack += int(a[i])
if int(h) - attack <= 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:
import sys
H,N = map(int,input().split())
array = list(map(int,input().split()))

if not ( 1 <= H <= 10**9 and 1 <= N <= 10**5 ): sys.exit()
if not ( 1 <= min(array) and max(array) <= 10**4 ): sys.exit()

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import bisect,collections,copy,heapq,itertools,math,string
import numpy as np
import sys
sys.setrecursionlimit(10**7)

def _S(): return sys.stdin.readline().rstrip()
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())

H,N = LI()
A = LI()

A_np = np.array(A)
A_sum = np.sum(A_np)

ans = True
if H>A_sum:
    ans=False

if ans:
    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, _ = [int(i) for i in input().split()]
A = [int(i) for i in input().split()]

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

Submission status: Accepted

Solution code:
H,N=map(int,input().split())
List = list(map(int, input().split()))
List.sort(reverse=True)
k = 0
res = "No"
for i in range(N):
  k += List[i]
  if k >= H:
    res = "Yes"
    break
print(res)

Submission status: Accepted

Solution code:
import math

h,n = map(int,input().split())
sum = 0

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

for val in li:
    sum += val

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

Submission status: Accepted

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

n3 = [int(j) for j in input().split()]

for i1 in range(n2):
    n1 -= n3[i1]

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

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

Submission status: Accepted

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

print(['No','Yes'][sum(al)>=h])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
H, N = map(int, input().split())
list_A = list(map(int,input().split()))
sum_list_A = sum(list_A)
if sum_list_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()))

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

Submission status: Accepted

Solution code:
h,n=map(int,input().split())
a=list(map(int, input().strip().split()))[:n]
b=sum(a)
if (b>=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:
import sys
import heapq
import math
import fractions
import bisect
import itertools
from collections import Counter
from collections import deque
from operator import itemgetter
def input(): return sys.stdin.readline().strip()
def mp(): return map(int,input().split())
def lmp(): return list(map(int,input().split()))

h,n=mp()
a=sum(lmp())
print("Yes" if a>=h else "No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#Macで実行する時
import sys
import os
if sys.platform=="darwin":
	base = os.path.dirname(os.path.abspath(__file__))
	name = os.path.normpath(os.path.join(base, '../atcoder/input.txt'))
	sys.stdin = open(name)

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

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

Submission status: Accepted

Solution code:
H,N=map(int,input().split())
print("NYoe s"[H<=sum(map(int,input().split()))::2])

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

Submission status: Accepted

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

Submission status: Accepted

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

aa = sum(a)

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()))
total = 0
for i in range(n):
  total += a[i]
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()))

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

Submission status: Accepted

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

Submission status: Accepted

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

if sum(c) >= a:
    print('Yes')
if sum(c) < a:
    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('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:
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, a = map(int, input().split())
arr = list(map(int, input().split()))
for i in arr:
    h-=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()))

a_sum = sum(a)

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

Submission status: Accepted

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

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

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

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

Submission status: Accepted

Solution code:
h,n,*a=map(int,open(0).read().split())
h-=sum(a)
if h>0:
  print("No")
else:
  print("Yes")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
h,n=map(int,input().split())
A=list(map(int,input().split()))
attack = sum(A)
if h > attack:
    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 sys
input = sys.stdin.readline
H,N = list(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())
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 sum(A) >= H:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

print('Yes' if H <= sum(map(int,input().split())) else 'No')

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
h,n=map(int,input('').split(' '))
a=list(map(int,input('').split(' ')))
s=0
for i in range(n):
    s=s+a[i]

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

suma = sum(a)

print('Yes' if h - suma <= 0 else '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(' '))
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()))
All = sum(A)

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

sum_ = sum(A)

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

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

Submission status: Accepted

Solution code:
def main():
    H, N = map(int, input().split(' '))
    A = input().split(' ')
    total = 0
    for i in A:
        total += int(i)
    if total >= H:
        print('Yes')
    else:
        print('No')
main()

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**7)
input = sys.stdin.readline

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:
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(reverse=True)

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

Submission status: Accepted

Solution code:
if __name__ == '__main__':

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

Submission status: Accepted

Solution code:
h,n = (int(a) for a in 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:
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


def main():
    H, N, *A = map(int, read().split())

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

    return


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import math

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:
import sys

def II(): return int(input())
def MI(): return map(int,input().split())
def LI(): return list(map(int,input().split()))
def TI(): return tuple(map(int,input().split()))
def RN(N): return [input().strip() for i in range(N)]


def main():
    H, N = MI()
    N = LI()
    Nsum = sum(N)


    if H<=Nsum:
        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 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()))
d=0
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()))
if sum(a) >= h:
  print('Yes')
else:
  print('No')

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
H,N,*A = map(int, open(0).read().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()))
x=sum(a)
if x >=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(reverse = True)

for i in A:
  H -= i
  if H <= 0:
    print('Yes')
    exit()

print('No')

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
h, _, *a = map(int, open(0).read().split())
print("YNeos"[sum(a) < h::2])

Submission status: Accepted

Solution code:
import sys
#import string
#from collections import defaultdict, deque, Counter
#import bisect
#import heapq
#import math
#from itertools import accumulate
#from itertools import permutations as perm
#from itertools import combinations as comb
#from itertools import combinations_with_replacement as combr
#from fractions import gcd
#import numpy as np

stdin = sys.stdin
sys.setrecursionlimit(10 ** 7)
MIN = -10 ** 9
MOD = 10 ** 9 + 7
INF = float("inf")
IINF = 10 ** 18

def solve():
    #n = int(stdin.readline().rstrip())
    h,n = map(int, stdin.readline().rstrip().split())
    A = list(map(int, stdin.readline().rstrip().split()))
    #numbers = [[int(c) for c in l.strip().split()] for l in sys.stdin]
    #word = [stdin.readline().rstrip() for _ in range(n)]
    #number = [[int(c) for c in stdin.readline().rstrip()] for _ in range(n)]
    #zeros = [[0] * w for i in range(h)]
    s = sum(A)
    if h <= s:
        print("Yes")
    else:
        print("No")

if __name__ == '__main__':
    solve()

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()))
x = sum(a)
if h <= x: 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())
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 = sum(map(int,input().split()))

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# FileName: 	B
# CreatedDate:  2020-06-27 15:34:06 +0900
# LastModified: 2020-06-27 15:35:45 +0900
#


import os
import sys
# import numpy as np
# import pandas as pd


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

Submission status: Accepted

Solution code:
import sys
input = lambda : sys.stdin.readline().rstrip()
sys.setrecursionlimit(max(1000, 10**9))
write = lambda x: sys.stdout.write(x+"\n")


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 >= 0:
    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[N-1-i]
    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()))
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())
As = list(map(int, input().split()))

sumA = sum(As)

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

Submission status: Accepted

Solution code:
import numpy as np

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

attack_arr = np.array(attack)

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