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: Wrong Answer

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

for a in A:
  h -= a
  if h<0:
    flag = True
    break

print("Yes" if flag else "No")

Submission status: Wrong Answer

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: Wrong Answer

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: Wrong Answer

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: Wrong Answer

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

while(h > 0):
  ans += 1
  h = h - max_a
  
if(ans <= 2):
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

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

if H - sum(A) <= 0:
    print("Yss")
else:
    print("No")

Submission status: Wrong Answer

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 damage < 0:     # forの中で、ダメージがマイナスであれば倒せない→NO
        return 'No'
    else:              # ダメージが0以上の時は倒せる→Yes
        return 'Yes'


print(hp(h, n, A))

Submission status: Wrong Answer

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 damage < 0:     # forの中で、ダメージがマイナスであれば倒せない→NO
        return 'No'
    else:              # ダメージが0以上の時は倒せる→Yes
        return 'Yes'

Submission status: Wrong Answer

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 damage < 0:     # forの中で、ダメージがマイナスであれば倒せない→NO
        return 'No'
    else:              # ダメージが0以上の時は倒せる→Yes
        return 'Yes'


print(hp(h, n, A))

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

Submission status: Wrong Answer

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

attack = list(map(int,input().split()))
print(attack)
total = sum(attack)

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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: Wrong Answer

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: Wrong Answer

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: Wrong Answer

Solution code:
H,N=map(int,input().split())
A=list(map(int,input().split()))
ans = sum(sorted(A,reverse=True)[:2])
if H <= ans:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
H,N=map(int,input().split())
A=list(map(int,input().split()))
ans = sum(sorted(A,reverse=True)[:2])
if H < ans:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

if H<=sum(A):
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

Solution code:
import numpy as np
 
N, M = map(int, input().split())
A = []
A = map(int, input().split())
 
dif = N - sum(A)
 
if dif >= 0:
  print(dif)
else:
  print('-1')

Submission status: Wrong Answer

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):
    skill = random.randint(0, N - 1)
    h = H - A[skill]
    h2 = h - A[skill]
    if h <= 0 or h2 <= 0:
        print('Yes')
    elif h > 0 or h2 > 0:
        print('No')

Submission status: Wrong Answer

Solution code:
h, a = map(int, input().split())
if h % a == 0:
    print(h // a)
else:
    print(h // a + 1)

Submission status: Wrong Answer

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

sum = 0
1<=H<=10**9
1<=N<=10**4


import random

for i in range(1,N+1):
    attack = random.randint(1,10**4)
    print(attack)

    sum += attack

total = sum

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

Submission status: Wrong Answer

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

sum = 0
1<=H<=10**9
1<=N<=10**4


import random

for i in range(1,N+1):
    attack = random.randint(1,10**5)
    print(attack)

    sum += attack

total = sum

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

Submission status: Wrong Answer

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

sum = 0
1<=H<=10**9
1<=N<=10**5


import random

for i in range(1,N+1):
    attack = random.randint(1,10**5)
    print(attack)

    sum += attack

total = sum

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

Submission status: Wrong Answer

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

sum = 0
1<=H<=10**9
1<=N<=10**5


import random

for i in range(1,N+1):
    attack = random.randint(1,10**5)
    print(attack)

    sum += attack

total = sum

if H - total < 0:
    print("Yes")
elif H - total > 0:
    print("No")

Submission status: Wrong Answer

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

sum = 0
1<=H<=10**9
1<=N<=10**5

import random

for i in range(1,N+1):
    attack = random.randint(1,10**5)
    print(attack)
    sum += attack
    print(sum)

if H - sum < 0:
    print("Yes")
elif H - sum > 0:
    print("No")

Submission status: Wrong Answer

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

1<=H<=10**9
1<=N<=10**5

import random

for i in range(1,N+1):
    print(random.randint(1,10**5))

sum = 0
sum += i

if H - sum < 0:
    print("Yes")
elif H - sum > 0:
    print("No")

Submission status: Wrong Answer

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: Wrong Answer

Solution code:
z=list(map(int,input().split()))
x=list(map(int,input().split()))
d={}
c=0
for i in x:
       if d.get(i,0)==0:
              c+=i
if c>=z[0]:
       print("YES")
else:
       print("NO")

Submission status: Wrong Answer

Solution code:
import sys
# sys.setrecursionlimit(100000)


def input():
    return sys.stdin.readline().strip()


def input_int():
    return int(input())


def input_int_list():
    return [int(i) for i in input().split()]


def main():
    h, n = input_int_list()
    A = input_int_list()
    if sum(A) > h:
        print("Yes")
    else:
        print("No")
    return


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

if s>=h:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
h,n=map(int,input().split())
a=map(int,input().split())
s=sum(a)
if s==h or s>h:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
r=input().split()
H=int(r[0])
N=int(r[1])
data_pre=input().split()
data=[int(s) for s in data_pre]
if max(data)>=H:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

c = 0

for i in range(len(A)):
  c = c + A[i]
  
if c > H:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
a,b=[int(i) for i in input().split()]
c=[int(i) for i in input().split()]
if(sum(c)>=210):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
H,N = map(int,input().split())
a = list(map(int,input().split()))
a.sort()
reversed(a)
flag = True
for i in range(N):
  H-=a[i]
  if H<=0:
    flag = False
    print('Yes')
if flag == True:
  print('No')

Submission status: Wrong Answer

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: Wrong Answer

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: Wrong Answer

Solution code:
import numpy as np
INPUT = input().split()
H = int(INPUT[0])
N = int(INPUT[1])
A_list = np.array(list(input().split()), dtype="int" )
if np.sum(A_list) >= H:
  print("yes")
elif np.sum(A_list) < H:
  print("no")

Submission status: Wrong Answer

Solution code:
import numpy as np
INPUT = input().split()
H = int(INPUT[0])
N = int(INPUT[1])
A_list = list(input().split())
total = 0
for x in A_list:
    total += int(x)
    
if total >= H:
  print("yes")
else:
  print("no")

Submission status: Wrong Answer

Solution code:
import numpy as np
INPUT = input().split()
H = int(INPUT[0])
N = int(INPUT[1])
A_list = np.array(list(input().split()), dtype="int" )
if np.sum(A_list) >= H:
  print("yes")
else:
  print("no")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
H,N=map(int,input().split())
"YNeos"[H>sum(map(int,input().split()))::2]

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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: Wrong Answer

Solution code:
H, N = map(int, input().split())
data = [int(i) for i in input().split()]
DATA = sorted(data, reverse=True)
count = 0

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

Submission status: Wrong Answer

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: Wrong Answer

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: Wrong Answer

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: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
H,N = map(int,input().split())
L = list(map(int,input().split()))
tot = sum(L)
if tot > H:
  print('YES')
else:
  print('NO')

Submission status: Wrong Answer

Solution code:

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

e=sum(l)
if e>=a:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:

a,b=map(int,input().split())
l=list(map(int,input().split()))
l=l+l
e=sum(l)
if e>=a:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

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

if sum(a) >= n:
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

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

if sum(a) > n:
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

Solution code:
import sys
import decimal # 10進法に変換，正確な計算

def input():
    return sys.stdin.readline().strip()

def main():
    h, n = map(int, input().split())
    a = list(map(int, input().split()))    
    for i in a:
        h -= i
        if h < 0:
            print("Yes")
            return
    print("No")
    

main()

Submission status: Wrong Answer

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

for i in range(n):
  for j in range(n):
    if a[i] + a[j] >= h:
      l.append(1)
    else:
      l.append(0)

print('Yes' if sum(l) > 0 else 'No')

Submission status: Wrong Answer

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

for i in A:
    H -= i
    if H <= 0:
        ans = 'Yes'
        break

print(ans)

Submission status: Wrong Answer

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

if h % a != 0:
  print(h//a + 1)
else:
  print(h//a)

Submission status: Wrong Answer

Solution code:
h, b = list(map(int, input().split()))
a = sorted(list(map(int, input().split())), reverse=True)
for i in a:
    h -= i
    if h < 0:
        print('Yes')
        exit()
print('No')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

SA = sum(A)
print(H - SA)

if H <= SA:
    print("Yes")

elif H > SA:
    print("No")

Submission status: Wrong Answer

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

SA = sum(A)
print(H - SA)

if H - SA <= 0:
    print("Yes")

elif H - SA > 0:
    print("No")

Submission status: Wrong Answer

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

SA = sum(A)

if H // SA > 1:
    print("No")

elif H // SA <=1:
    print("Yes")

Submission status: Wrong Answer

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

SA = sum(A)

if H // SA > 1:
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import fileinput

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

print(sum(a))

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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: Wrong Answer

Solution code:
#import collections
#import itertools as it
#import math
#import numpy as np
#import sys 
#sys.exit()
 
#  = input()
#  = int(input())
h, n  = map(int, input().split())
a  = list(map(int, input().split()))
'''
n = input()
a = [int(input()) for i in range(n)]
'''
'''
n,m = map(int, input().split())
a = [list(map(int, input().split())) for _ in range(m)]
'''
# c = collections.Counter()
#-------------------------------#
if sum(a)>=n:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
h,n=map(int,input().split())
a=list(map(int,input().split()))
a.sort(reverse=True)
if a[0]<h:
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:

#a,b = map(int, input().split())
import math
if __name__ == "__main__":

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

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

Submission status: Wrong Answer

Solution code:

#a,b = map(int, input().split())
import math
if __name__ == "__main__":

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

    allAttack = 0
    for i in A:
        allAttack += i
    
    if allAttack > H:
        print ("Yse")
    else:
        print ("No")

Submission status: Wrong Answer

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

d = []

d = sorted(c, reverse = True)

i = sum(d[:2])

if a / i <= 0:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

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

d = []

d = sorted(c, reverse = True)

i = sum(d[:2])

if a / i <= 0:
  print("yes")
else:
  print("no")

Submission status: Wrong Answer

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: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
H=[int(y) for y in input().split()]
A=[int(y) for y in input().split()]
if H[0]<sum(A):
   print("Yes")
else:
   print("No")

Submission status: Wrong Answer

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


ans = 'yes'


if sum(A) < H:
    ans = 'No'


print(ans)

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

Solution code:
h, n = map(int, input().split())
ls = [int(i) for i in input().split()]
st = list(set(ls))
summ = sum(st)
health = h - summ
if health <= 0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
h, n = (int(x) for x in input().split())
a = list((int(x) for x in input().split()))
a.sort()
for num in range(n):
  h -= num
if h <= 0:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
h, n = map(int, input().split())
list = list(map(int, input().split()))
max=1
max2=0
for i in range(n):
	if list[i]>=max:
		max2=max
		max=list[i]
	elif max>list[i]>max2:
		max2=list[i]
	else:	
		pass	
#print(max)
#print(max2)
if max+max2>=h:
	print('Yes')
else:
	print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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: Wrong Answer

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: Wrong Answer

Solution code:
h, a = map(int, input().split())
count = 0
while h > 0:
    h -= a
    count += 1
print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

    print("NO")
    return


main()

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

if sum(aL) <= a:
    print("Yes")
    exit()
print("No")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import math

def resolve():

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

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

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


import sys
from io import StringIO
import unittest

class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)
    def test_入力例_1(self):
        input = """10 3
4 5 6"""
        output = """Yes"""
        self.assertIO(input, output)
    def test_入力例_2(self):
        input = """20 3
4 5 6"""
        output = """No"""
        self.assertIO(input, output)
    def test_入力例_3(self):
        input = """210 5
31 41 59 26 53"""
        output = """Yes"""
        self.assertIO(input, output)
    def test_入力例_4(self):
        input = """211 5
31 41 59 26 53"""
        output = """No"""
        self.assertIO(input, output)

if __name__ == "__main__":
    unittest.main()

Submission status: Wrong Answer

Solution code:
from functools import reduce
from operator import add
H, N = map(int, input().split())
A = input().split()

winner = False
if len(set(A)) == N:
    if H <= reduce(add, map(int, A)):
        winner = True

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import numpy as np

ene=list(map(int, input().split()))
num=list(map(int, input().split()))

if ene[0]>np.array(num).sum():
    print("NO")
else:
    print("Yes")

Submission status: Wrong Answer

Solution code:
import numpy as np
 
ene=list(map(int, input().split()))
num=list(map(int, input().split()))
 
tmp = ene[0] - (np.array(num).sum())*2
if tmp>0:
    print("NO")
else:
    print("Yes")

Submission status: Wrong Answer

Solution code:
import numpy as np

ene=list(map(int, input().split()))
num=list(map(int, input().split()))

tmp = ene[0] - np.array(num).sum()
if tmp*2>0:
    print("NO")
else:
    print("Yes")

Submission status: Wrong Answer

Solution code:
import numpy as np
ene=list(map(int, input().split()))
num=list(map(int, input().split()))
tmp = ene[0] - np.array(num).sum()
if tmp>0:
    print("NO")
else:
    print("Yes")

Submission status: Wrong Answer

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

x=0

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

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

Submission status: Wrong Answer

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

x=0

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

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

Submission status: Wrong Answer

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: Wrong Answer

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

Submission status: Wrong Answer

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: Wrong Answer

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

Submission status: Wrong Answer

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

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

if b > h:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline
H, N = map(int, input().split())
sm = sum(list(map(int, input().split())))
if N <= sm: print("Yes")
else: print("No")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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


if length == 1:
    sum =int(a[0])
    result = h - sum
else:
    sum = int(a[-1]) + int(a[-2])
    result = h - sum

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

a_sum = 0
for a_i in sorted(a, reverse=True):
    a_sum += a_i
    if a_sum >= h:
        print('YES')
        break
else:
    print('NO')

Submission status: Wrong Answer

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

if H - Sum < 0:
    print("Yes")
elif H - Sum > 0:
    print("No")