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:
import bisect, collections, copy, heapq, itertools, math, string
import sys
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return map(int, sys.stdin.readline().rstrip().split())
def LI(): return list(map(int, sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())

from  collections import defaultdict
from collections import Counter
import bisect
from functools import reduce

def main():
    H, N = MI()
    A = LI()
    A_sum = sum(A)
    if A_sum >= H:
        print('Yes')
    else:
        print('No')



if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import math
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()))
hitpoint=h
atack = a[:]
for e in atack:
    hitpoint -= e
    if hitpoint <= 0:
        break
if hitpoint <= 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
H, N = map(int, input().split())
A_list = []
for i in range(1, N+1):
    A_list.append("A_" + str(i))

A_list = map(int, input().split())
A_total = sum(A_list)

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

Submission status: Accepted

Solution code:
H,M = map(int,input().split())
attack = list(map(int,input().split()))
if H - sum(attack) <=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=h-a[i]
if h<=0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
# モンスターの体力H
# アライグマの必殺技の種類N
# i番目の必殺技使うと、モンスターの体力Ai減らせる

# H - (A1 + A2 + A3...) <= 0 となるなら 'Yes',
# ならないなら'No'が出力される

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

if H - A1 <= 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
'''
問題：
    アライグマはモンスターと戦っています。

    モンスターの体力は H です。
    アライグマは N 種類の必殺技を使うことができ、
    i 番目の必殺技を使うとモンスターの体力を Ai 減らすことができます。
    必殺技を使う以外の方法でモンスターの体力を減らすことはできません。

    モンスターの体力を 0 以下にすればアライグマの勝ちです。

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

'''
制約：
    1 ≦ H ≦ 1000000000
    1 ≦ N ≦ 100000
    1 ≦ Ai ≦ 10000
    入力中のすべての値は整数である。
'''

# 標準入力から H, N, Ai を取得する
h, m = map(int, input().split())
a = list(map(int, input().split()))

# 必殺技を1回ずつ使った場合、モンスターの体力をどれだけ削れるか計算する
hissatsu_hp = 0
for i in range(0, m):
    hissatsu_hp += a[i]

# 同じ必殺技を使わずアライグマを倒せるか判定して結果を出力する
result = ""
if hissatsu_hp >= h:
    result = "Yes"
else:
    result = "No"

print(result)

Submission status: Accepted

Solution code:
# B - Common Raccoon vs Monster

# H N
H, N = map(int, input().split())
my_list = list(map(int, input().split(maxsplit=N)))

if H <= sum(my_list):
    answer = 'Yes'
else:
    answer = 'No'

print(answer)

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:
# -*- coding: utf-8 -*-
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 = map(int, input().split())
a_sum = sum(A)

if H - a_sum <= 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

if H-A1<=0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
str = input()
str2 = input()
nums  = str.split()
nums2  = str2.split()
if len(nums2) != int(nums[1]):
    print("error")
else:
   totalDamege = 0
   for num in nums2:
       totalDamege += int(num)
   if int(nums[0]) <= totalDamege:
       print("Yes")
   else:
       print("No")

Submission status: Accepted

Solution code:
#ABC153B
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()))
print('Yes' if h <= sum(a) else 'No')

Submission status: Accepted

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

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

Submission status: Accepted

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

for i in range (0, N):
    H -= lst[i]

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

Submission status: Accepted

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

H, N = map(int, input().split())
damege = map(int, input().split())

total_damege = sum(damege)

if H - total_damege <= 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

# H（体力）,N（種類）：標準入力
# リストの中のA(体力を減らす：攻撃力)：リストを作成し、標準入力
h, n = map(int, input().split())
A = list(map(int, input(). split()))


# 攻撃力Aが0からNの間で増えていくとき、
# H が 0 以下のとき Yes、そうでないとき No となる。

def hp(h: int, n: int, A: list) -> str:
    damage = 0                   # ダメージは最初0なので、0と定義
    for i in range(0, n):        # 0からn番目まで繰り返す時
        damage += int(A[i])      # リスト[i]（インデックスi番目）をintに変更
        i += 1                   # 0番目からi番目まで1ずつ足されていく

    if (h - damage) <= 0:     # forの中で、残った体力が0以下であれば倒せる→Yes
        return 'Yes'
    else:              # 残った体力が0以上の時は倒せる→No
        return 'No'


print(hp(h, n, A))

# TypeError: list expected at most 1 argument, got 2

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

# モンスターの体力は H です。
# アライグマは N種類 の必殺技を使うことができ、i番目の必殺技を使うとモンスターの体力を Ai 減らすことができます。
# アライグマが同じ必殺技を2度以上使うことなくモンスターに勝つことができるなら Yes を、できないなら No を出力せよ。

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

Submission status: Accepted

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

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

total = sum(attack)

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

Submission status: Accepted

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

if (H - A_sum) <= 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:
#153b
#値を受け取る
H, N = map(int, input().split())
A = list(map(int, input().split()))

#listの合計で倒せるか判断

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

Submission status: Accepted

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

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

Submission status: Accepted

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


def answer(H: int, N: int, A: list) -> str:
    damage = 0                          # damageに0を代入します
    for i in range(0, N):               # 0:Nの間にiがある間は
        damage += int(A[i])             # damageにリスト[i]をint(整数）に変え足します
                                        # 6でdamage=0にforの間Aの値を足していく意味
        i += 1                          # 条件を満たす間はiに1つずつ足していきます。リスト内を進めていく
    if damage < H:
        return 'No'
    else:
        return 'Yes'

print(answer(H, N, A))

Submission status: Accepted

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

result = sum(a)

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
hp,sp = input().split(" ")
hp = int(hp)
sp = int(sp)
attack = input().split(" ")
damage = 0

for i, new in enumerate(attack):
    attack[i] = int(attack[i])

for i in range(0,sp):
    damage += attack[i]

if damage >= hp:
    print("Yes")

else:
    print("No")

Submission status: Accepted

Solution code:
H,N= map(int, input().split())
list = list(map(int, input().split())) #Aiを入力


for i in list:
    H=H-i

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

Submission status: Accepted

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


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

Submission status: Accepted

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

rest_H = H - sum(A)

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

Submission status: Accepted

Solution code:
h,n = map(int,input().split())
# 整数の入力値をスペースで受け取ってリスト化
a = list(map(int,input().split()))

# アライグマの体力(h)が必殺技の合計(sum(s))が大きければNo
if h > sum(a):
    print("No")
# 必殺技の合計が大きければYes
else:
    print("Yes")

Submission status: Accepted

Solution code:
# 勝敗 = モンスター体力H - 必殺技ダメージA
H, N = map(int, input().split())
A = list(map(int, input().split()))

answer = H - sum(A)

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
#   アライグマ対モンスター

#   入力
hp_m, n = map(int, input().split())
attack = list(map(int, input().split()))

total_attack = sum(attack)

if total_attack >= hp_m:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
#https://atcoder.jp/contests/abc153/tasks/abc153_b
S_list = [(input()) for i in range(2)]
H,N = map(int,S_list[0].split())
S_list_1 = list(map(int,S_list[1].split()))
damage = sum(S_list_1)
if damage >= H:
    result = "Yes"
else:
    result = "No"
print(result)

Submission status: Accepted

Solution code:
# モンスターの体力　H
# アライグマの必殺技の種類　N
# i 番目の必殺技を使うとモンスターの体力を A i減らすことができる。
# 必殺技を使う以外の方法でモンスターの体力を減らすことはできない
# モンスターの体力が0以下にすれば、アライグマの勝ち
# アライグマが同じ必殺技を2度以上使うことはない
# モンスターに買ったらYes　できないならNo　と出力

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

# モンスターの残り体力
rest_H = H - sum(A)

if rest_H <= 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))<=0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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


h = h - sum(a)

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

Submission status: Accepted

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

attack = sum(A)

if H <= attack:
    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()))
hissatsu = 0

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

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

Submission status: Accepted

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

for i in range(0, N):
    H -= N_list[i]

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

Submission status: Accepted

Solution code:
# アライグマがN種の必殺技を2回以上使わずに体力Hのモンスターを倒せるか

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

if sum(waza) >= 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:
# abc153B
# https://atcoder.jp/contests/abc153/tasks/abc153_b

# モンスターの体力はH
# アライグマはN種類の必殺技がある
# i番目の必殺技を使うとAiの体力を減らせる
# モンスターの体力が0なら勝ち

# モンスターに勝てたら"Yes"、できなかったら"No"

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

# 処理
# 必殺技を受けた残りの体力
h = h - sum(a)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
H, N = map(int, input().split())
A_list = []
for i in range(1, N+1):
    A_list.append("A_" + str(i))

A_list = map(int, input().split())
A_total = sum(A_list)

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

Submission status: Accepted

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

answer = sum(A)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
def main():
    H, _ = map(int, input().split())
    offence = sum([int(x) for x in input().split()])
    print('Yes' if H <= offence else 'No')


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

print(result)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def answer(h: int, n: int, a: []) -> str:
    return 'Yes' if h <= sum(a) else 'No'


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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

if H-A1<=0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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


def answer(H: int, N: int, A: list) -> str:
    damage = 0                          
    for i in range(0, N):               
        damage += int(A[i])             
                                        
        i += 1                          
    if damage < H:
        return 'No'
    else:
        return 'Yes'

print(answer(H, N, A))

Submission status: Accepted

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

S = H - sum(A)

if S <= 0:
    print('Yes')

else:
    print('No')

Submission status: Accepted

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

A_list = []
for i in range(1, N+1):
    A_list.append("A_" + str(i))
A_list = map(int,input().split())

Total =sum(A_list)

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

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


def answer(H: int, N: int, A: list) -> str:
    damage = 0                          # damageに0を代入します
    for i in range(0, N):               # 0:Nの間にiがある間は
        damage += int(A[i])             # damageにリスト[i]をint(整数）に変え足します
                                        # 6でdamage=0にforの間Aの値を足していく意味
        i += 1                          # 条件を満たす間はiに1つずつ足していきます。リスト内を進めていく
    if damage < H:
        return 'No'
    else:
        return 'Yes'

print(answer(H, N, A))

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

Submission status: Accepted

Solution code:
#a=int(input())
#b,c=int(input()),int(input())
# c=[]
#  for i in b:
#     c.append(i)
H,N = map(int,input().split())
f = list(map(int,input().split()))
#j = [input() for _ in range(a)]
# h = []
# for i in range(e1):
#     h.append(list(map(int,input().split())))
if sum(f)>=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:
# B - Common Raccoon vs Monster

# モンスターの体力はHであり、N種類の必殺技で戦う
# i番目の技で体力をAi減らすことができる
# 体力を0にできるならYes、できないならNoを出力する


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

answer = H - sum(A)

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

Submission status: Accepted

Solution code:
# B - Common Raccoon vs Monster
# https://atcoder.jp/contests/abc153/tasks/abc153_b

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


def answer(H: int, N: int, A: list) -> str:
    damage = 0
    for i in range(0, N):
        damage += int(A[i])
        i += 1
    if damage < H:
        return 'No'
    else:
        return 'Yes'

print(answer(H, N, A))

Submission status: Accepted

Solution code:
h,n = [int(x) for x in input().split()]
a = [int(x) for x in input().split()]
res = "No"
for i in range(n):
  h -= a[i]
  if h <= 0:
    res = "Yes"
print(res)

Submission status: Accepted

Solution code:
# 153_b
# B - Common Raccoon vs Monster
import random

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

if (1 <= H, H <= 10 ** 9) and (1 <= N, N <= 10 ** 5):
    for j in range(len(A)):
        H -= A[j]
    if H <= 0:
        print('Yes')
    if H > 0:
        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, input().split())
special_move = input().split()
def answer(H: int, N: int, special_move: list) -> str:
    damage = 0
    for i in range(0, N):
        damage += int(special_move[i])
    if damage >= H:
        return 'Yes'
    else:
        return 'No'
print(answer(H, N, special_move))

Submission status: Accepted

Solution code:
H, N = map(int, input().split())
special_move = input().split()
def answer(H: int, N: int, special_move: list) -> str:
    damage = 0
    for i in range(0, N):
        damage += int(special_move[i])
    if damage >= H:
        return 'Yes'
    else:
        return 'No'
print(answer(H, N, special_move))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# 入力
monster_hp, quantity_of_skills = map(int, input().split())
skills = map(int, input().split())
skills_list = list(skills)

# 処理
total_damages = 0
for i in skills_list:
    total_damages += i

if monster_hp <= total_damages:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
from itertools import chain

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


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


def main():
    tokens = chain(*(line.split() for line in sys.stdin))
    H = int(next(tokens))  # type: int
    N = int(next(tokens))  # type: int
    A = [int(next(tokens)) for _ in range(N)]  # type: "List[int]"
    answer = solve(H, N, A)
    print(answer)


if __name__ == "__main__":
    main()

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

if a[0]<= sum(b):
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
#s=int(input())
# b=input()
# c=[]
# for i in range(b):
#     c.append(a[i])
a = list(map(int,input().split()))
b = list(map(int,input().split()))

if a[0]<=sum(b):
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
H, N = map(int, input().split())
A = sorted(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.sort(reverse=True)
temp = 0
ans = "No"
for i in a:
    temp += i 
    if temp>=h:
        ans = "Yes"
        break
print(ans)

Submission status: Accepted

Solution code:
hp, count_skills = map(int, input().split())
a = map(int, input().split())
skills_list = list(a)

for skill in skills_list:
    hp -= skill
    if hp <= 0:
        print('Yes')
        break
if hp >= 1:
    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 atc_153b(a: str, b: str) -> str:
    HN = a.split(" ")
    H = int(HN[0])
    N = int(HN[1])

    A = b.split(" ")
    A_int = [int(ai) for ai in A]
    damage = sum(A_int)

    if (H - damage) <= 0:
        return "Yes"
    else:
        return "No"


a = input()
b = input()
print(atc_153b(a, b))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import exit

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

print("No")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

for i in a:
  count += i
if count >= HP:
  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 i in range(N):
    sum += A[i]

if (H - sum) <= 0:
    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())
data = list(map(int, input().split()))
S = 0
for i in range(0,len(data)):
    S += data[i]

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# 153b

def atc_153b(a: str, b: str) -> str:
    HN = a.split(" ")
    H = int(HN[0])
    N = int(HN[1])

    A = b.split(" ")
    A_int = [int(ai) for ai in A]
    damage = sum(A_int)

    if (H - damage) <= 0:
        return "Yes"
    else:
        return "No"


a = input()
b = input()
print(atc_153b(a, b))

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

if __name__ == "__main__":
    main()

Submission status: Accepted

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

a1=sum(a)
if(a1>=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()))
atk = 0
for i in A:
    atk += i
if H > atk:
    print("No")
else:
    print("Yes")

Submission status: Accepted

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

if N - sum(A) <= 0:
    result = "Yes"
else:
    result = "No"
print(result)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# 数値の取得
hp,n = map(int,input().split())
damage_list = list(map(int,input().split()))

# 判定結果を出力
damage_sum = sum(damage_list)
if damage_sum >= hp:
    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 = 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 "No")

Submission status: Accepted

Solution code:
H, N = map(int, input().split())
A = sorted(list(map(int, input().split())), reverse=True)
print("Yes") if H - sum(A) <= 0 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")