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:
import numpy as np
H,N=input().split()
H=int(H)
N=int(N)

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

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

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

Submission status: Wrong Answer

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

all_damege = 0
for i in Ai:
    all_damege+=i
if H<all_damege:
    print('Yes')
elif H>=all_damege:
    print('No')

Submission status: Wrong Answer

Solution code:
import sys
 
 
hp, length = [int(v) for v in input().split(' ')]
 
if length < 2:
    print('No')
    sys.exit(0)
    
 
damages = sorted([int(d) for d in input().split(' ')])
 
 
if damages[-1] + damages[-2] >= hp:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
import sys


hp, length = [int(v) for v in input().split(' ')]

if length < 2:
    print('no')
    sys.exit(0)
    

damages = sorted([int(d) for d in input().split(' ')])


if damages[-1] + damages[-2] >= hp:
    print('yes')
else:
    print('no')

Submission status: Wrong Answer

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

H = l1[0]

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

Submission status: Wrong Answer

Solution code:
H,N=map(int,raw_input().split())
A=map(int,raw_input().split())
A.sort(reverse=True)
ans=False
for i in range(N):
  H = H - A[i]
  if H<=0:
    ans = True
    break
if ans:
  print "yes"
else:
  print "No"

Submission status: Wrong Answer

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

N=sum(num[2:])

if num[0]<=N:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
hp, atk = input().split()

hp = int(hp)
atk = int(atk)

value = 0

numlist = list((input().split()))

numlist = list(map(int, numlist))

for i in range(atk):
    value = value + numlist[i]

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

Submission status: Wrong Answer

Solution code:
hp, atk = input().split()

hp = int(hp)
atk = int(atk)

value = 0

numlist = list((input().split()))

numlist = list(map(int, numlist))

print(numlist)

for i in range(atk):
    value = value + numlist[i]

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

Submission status: Wrong Answer

Solution code:
hp, atk = input().split()

hp = int(hp)
atk = int(atk)

value = 0

numlist = list((input().split()))

numlist = list(map(int, numlist))

numlist = sorted(numlist, reverse=True)

for i in range(atk):
    value = value + numlist[i]
    if value > hp:
        print("Yes")
    else:
        if i+1 == atk:
            print("No")
        else:
            continue

Submission status: Wrong Answer

Solution code:
hp, atk = input().split()

hp = int(hp)
atk = int(atk)

value = 0

numlist = list((input().split()))

numlist = list(map(int, numlist))

numlist = sorted(numlist, reverse=True)

for i in range(atk):
    value = value + numlist[i]
    
if value > hp:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
hp, atk = input().split()

hp = int(hp)
atk = int(atk)

numlist = list((input().split()))

numlist = list(map(int, numlist))

numlist = sorted(numlist, reverse=True)

for i in range(atk):
    value = 0
    value = value + numlist[i]
    if value > hp:
        print("Yes")
        break
    else:
        print("No")
        break

Submission status: Wrong Answer

Solution code:
hp, atk = input().split()

hp = int(hp)
atk = int(atk)

numlist = list((input().split()))

numlist = list(map(int, numlist))

numlist = sorted(numlist, reverse=True)

print(numlist)

for i in range(atk):
    value = 0
    value = value + numlist[i]
    if value > hp:
        print("Yes")
        break
    else:
        print("No")
        break

Submission status: Wrong Answer

Solution code:
import math

hp, atk = input().split()

hp = int(hp)
atk = int(atk)

numlist = list((input().split()))

numlist = list(map(int, numlist))

for i in range(atk):
    value = 0
    value = value + numlist[i]

if value > hp:
    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("NO")
else:
    print("YES")

Submission status: Wrong Answer

Solution code:
'''
211 5
31 41 59 26 53
'''
power, moves = [int(x) for x in input().split()]
powers = sum([int(x) for x in input().split()])
print(["NO","YES"][powers >= power])

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

Submission status: Wrong Answer

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

if sum(atacks) >= H:
  print('YES')
else:
  print('NO')

Submission status: Wrong Answer

Solution code:
# B - Common Raccoon vs Monster
def main():
    H, _, *A = map(int, input().split())
    print("Yes" if sum(A) >= H else "No")


if __name__ == "__main__":
    main()

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

Submission status: Wrong Answer

Solution code:
h, n = list(map(int, input().split()))
a = list(map(int, input().split()))
answer = "No"
i = 0
while (i < n):
  if(a[i] <= 0):
    answer = "Yes"
    break
  else:
    i += 1
print(answer)

Submission status: Wrong Answer

Solution code:
h, n = list(map(int, input().split()))
a = list(map(int, input().split()))
i = 0
while (i < n):
  if(a[i] <= 0):
    print("Yes")
    break
  else:
    i += 1
print("No")

Submission status: Wrong Answer

Solution code:
import sys

def propare():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    H = int(next(tokens))
    N = int(next(tokens))
    A_list = []
    for i in range(N):
        A_list.append(int(next(tokens)))

    solve(H, N, A_list)

def solve(H: int, N: int, A_list: list):
    sum_a = 0
    for a in A_list:
        sum_a = sum_a + a

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

    return


 
if __name__ == "__main__":
    propare()

Submission status: Wrong Answer

Solution code:
import sys

def propare():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    H = int(next(tokens))
    N = int(next(tokens))
    A_list = []
    for i in range(N):
        A_list.append(int(next(tokens)))

    solve(H, N, A_list)

def solve(H: int, N: int, A_list: list):
    sum_a = 0
    for a in A_list:
        sum_a += sum_a + a

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

    return


 
if __name__ == "__main__":
    propare()

Submission status: Wrong Answer

Solution code:
import sys

def propare():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    H = int(next(tokens))
    N = int(next(tokens))
    A_list = []
    for i in range(N):
        A_list.append(i)

    solve(H, N, A_list)

def solve(H: int, N: int, A_list: list):
    sum_a = 0
    for a in A_list:
        sum_a += sum_a + a

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

    return


 
if __name__ == "__main__":
    propare()

Submission status: Wrong Answer

Solution code:
H,N = 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:
# -*- coding:utf-8 -*-

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

count = 0
for ax in a:
  count += ax
if count > h:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
HP,number=map(int,input().split())
a=list(map(int, input().split()))

i=0
attack=0

while True:
  attack=attack+a[i]
  i=i+1
  if i==number:
    break

if attack>=HP:
  print('True')
else:print('失敗！')

Submission status: Wrong Answer

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

H = HN[0]
N = HN[1]

isV = False

allA = sum(A)

for i in range(N):
    H = min(H - (2*A[i]) , H - allA)
    if H <= 0:
        isV = True
        break
    else:
        H = HN[0]
    


if isV:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

count = 0
arr = list(map(int, input().split()[:N]))
attack = H

for i in range(N):
    attack = attack - arr[i]
    count = count + 1
    i = i + 1
    if attack <= 0 and count > 1:
        print('Yes')
    elif attack > 0 and i == N:
        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(max(A) > H):
  print("Yes")
elif(sum(A) > H):
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

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

count = 0
arr = list(map(int, input().split()[:N]))
attack = H

for i in range(N):
    attack = attack - arr[i]
    count = count + 1
    i = i + 1

if attack <= 0 and count > 1:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

count = 0
arr = list(map(int, input().split()[:N]))
attack = H

for i in range(N):
    attack = attack - arr[i]
    count = count + 1
    i = i + 1
if attack <= 0 and count > 1:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

count = 0
i = 0
arr = list(map(int, input().split()[:N]))
attack = H

for i in range(N):
    attack = attack - arr[i]
    count = count + 1
    i = i + 1
if attack <= 0 and count > 1:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
import math

a,b=map(int,input().split())
array = map(int,input().split())

sum = 0

for skill in array:
  a -= skill
if(a <= 0):
  print("yes")
else:
  print("no")

Submission status: Wrong Answer

Solution code:
import math

a,b=map(int,input().split())
array = map(int,input().split())

sum = 0

for skill in array:
  a -= skill
  print(a)
if(a <= 0):
  print("yes")
else:
  print("no")

Submission status: Wrong Answer

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

count = 0
i = 0
arr = list(map(int, input().split()[:N]))
attack = H

for i in range(N):
    attack = attack - arr[i]
    count = count + 1
    i = i + 1
    if attack <= 0:
        if count > 1:
            print("Yes")
            break
        else:
            print("No")
            break
if attack > 0:
    print("No")

Submission status: Wrong Answer

Solution code:
def win(h,n,arr):
    cnt=0
    for i in range(n):
        h-=arr[i]
        if h<=0:
            cnt=1
    return cnt
  
"""
h=int(input("Enter h:"))
n=int(input("Enter n"))
arr=[]
for i in range(n):
    a=int(input("Enter"))
    arr.append(a)
"""
h=211
n=5
arr=[31,41,59,26,53]
l=win(h,n,arr)
if l==1:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
import math

a,b=map(int,input().split())
array = map(int,input().split())

sum = 0

for skill in array:
  sum += skill

if(sum >= a):
  print('yes')
else:
  print('no')

Submission status: Wrong Answer

Solution code:
def win(h,n,arr):
    cnt=0
    for i in range(n):
        h-=arr[i]
        if h<=0:
            cnt=1
    return cnt
  
"""
h=int(input("Enter h:"))
n=int(input("Enter n"))
arr=[]
for i in range(n):
    a=int(input("Enter"))
    arr.append(a)
"""
h=10
n=3
arr=[4,5,6]
l=win(h,n,arr)
if l==1:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
import math

a,b=map(int,input().split())
array = map(int,input().split())

sum = 0

for skill in array:
  sum += skill

if(sum >= a):
  print("yes")
else:
  print("no")

Submission status: Wrong Answer

Solution code:
def win(h,n,arr):
    cnt=0
    for i in range(n):
        h-=arr[i]
        if h<=0:
            cnt=1
    return cnt
  
"""
h=int(input("Enter h:"))
n=int(input("Enter n"))
arr=[]
for i in range(n):
    a=int(input("Enter"))
    arr.append(a)
"""
h=20
n=3
arr=[4,5,6]
l=win(h,n,arr)
if l==1:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

count = 0
i = 0
arr = list(map(int, input().split()[:N]))
attack = H

for i in range(N):
    attack = attack - arr[i]
    i = i + 1
    count = count + 1

if attack <= 0:
    if count > 1:
        print("Yes")
    else:
        print("No")
else:
    print("No")

Submission status: Wrong Answer

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

count = 0
i = 0
arr = list(map(int, input().split()[:N]))
attack = H

for i in range(N):
    attack = attack - arr[i]
    i = i + 1
    count = count + 1

if count > 1 and attack <= 0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

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

#print(A)
if H-sumA <= 0:
  print('yes')
else:
  print('no')

Submission status: Wrong Answer

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

count = 0
i = 0
arr = list(map(int, input().split()[:N]))
attack = H

for i in range(N):
    attack = attack - arr[i]
    print(attack)
    i = i + 1
    count = count + 1

if count > 1 and attack <= 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:
# -*- coding: utf-8 -*-
# 整数の入力
#a = int(input())
# スペース区切りの整数の入力
#while True:
b, c = map(int, input().split())
#	if(b < 10 and c < 10):
#		break
# 文字列の入力
#s = input()
#連結
#aaa = str(b) + str(c)
# 空白区切り入力 List
s = input().split()

s_list = []
s_list = [int(s) for s in s]
list.sort(s_list, reverse=True)

count = 0
sum = 0
for inp in s_list:
	sum = sum + int(inp)
	#print(sum)
	count+=1
	if(count) > c:
		break
if(sum > b):
	print('Yes')
else:
	print('No')

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
b, c = map(int, input().split())
s = input().split()

s_list = []
s_list = [int(s) for s in s]
list.sort(s_list, reverse=True)
print(s_list)

count = 0
sum = 0
for inp in s_list:
	sum = sum + int(inp)
	print(sum)
	count+=1
	if(count) > c:
		break
if(sum > b):
	print('Yes')
else:
	print('No')

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
import math
import itertools

h, n = map(int, input().split())
a = input()
dmg = list(map(int, a.split()))
ptn = list(itertools.combinations(dmg, 2))

count = 0
for i in range(0, len(ptn)):
    atk = int(ptn[i][0]) + int(ptn[i][1])
    if h <= atk:
        count += 1 

if count>=1:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
h,n =map(int,input().split())
m = [i for i in input().split()]
res = 0
for i in m:
  res += int(i)
if res<= h:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
H, N = map(int, input().split())
move = [int(a) for a in map(int, input().split())]

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
H, A = map(int, input().split())
move = [int(a) for a in map(int, input().split())]

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

Submission status: Wrong Answer

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

# Input
s = [input() for i in range(2)]
HN = (list(s[0].split()))
A = (list(s[1].split()))

# Proccess
sum_a = 0
for i in range(int(HN[1])-1):
  sum_a = sum_a +int(A[i])
  
# Output							
if int(sum_a) >= int(HN[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('No')
else:
    print('yes')

Submission status: Wrong Answer

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

def attack2(l1):
    H, N= l1[0], l1[1]
    v=0
    for i in range(2, len(l1)):
        v += l1[i]
    result = H - v
    if result >0:
        return "no"
    else:
        return "yes"
print(attack2(l1))

Submission status: Wrong Answer

Solution code:
list1 = input().split(' ')
list2 = input().split(' ')
list2 =  [int(s) for s in list2]

num = int(list1[1])
HP = int(list1[0])
D = 0
for N in list2:
  D += N
  
if D > HP:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
H, N = map(int, input().split())
A = [int(i) for i in input().split()]
for j in range(N):
    H -= A[j]
    if H <= 0:
        print("YES")
        break
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
H,N = map(int,input().split())
A = [int(x) for x in input().split()]
for xg in A:
    H=H-xg
if H >= 0:
    print('No')
elif H < 0:
    print('Yes')

Submission status: Wrong Answer

Solution code:
H,N = map(int,input().split())
A = [int(x) for x in input().split()]
for xg in A:
    H=H-xg
    if H < 0:
        print('Yes')
if H >= 0:
    print('No')

Submission status: Wrong Answer

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

def attack_sum():
	sum_damage = 0
	for i in A:
		sum_damage += i
	return sum_damage

ans = ""
if H <= attack_sum():
	ans = "YES"
else:
	ans = "NO"
print(ans)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
b, c = map(int, input().split())
s = input().split()

sum = 0
for inp in s:
	sum = sum + int(inp)
if(sum > b):
	print('Yes')
else:
	print('No')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
s = input().split()  # s[0]は
s2 = list(map(int, input().split()))  # 必殺技

if sum(s2) > int(s[0]):
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
H,N = map(int,input().split())
A = [int(x) for x in input().split()]
for xg in A:
    H=H-xg
    if H < 0:
        print('Yes')
if H > 0:
    print('No')

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import os
import sys

def main():
    H , A = map(int , input().split())
    list = [s for s in input().split()]
    c = sum(int(i) for i in list)
    if c > H :
        print ('Yes')
    else :
        print ('No')
    #print (str(X))

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
firstinput = input("")
secondinput = input("")
firstinputsplit = firstinput.split(" ")
secondinputsplit = secondinput.split(" ")
H = int(firstinputsplit[0])
N = int(firstinputsplit[1])
firstcont = H <= 1000000000 and N <= 1000000
skill = 0
for i in secondinputsplit:
  skill = skill + int(i)
if firstcont == True and skill <= 10000:
  if H <= skill:
    print("Yes")
  else:
    print("No")
else:
  print("")

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split(' '))
print((a+b-1)//b)

Submission status: Wrong Answer

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

if sum(s2) >= int(s[0]):
    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()]
  
if h <= sum(set(a_list)):
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a, b=map(int,input().split())
l=list(map(int,input().split()))
c=sum(l)
if c>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 =  [int(x) for x in input().split()]
A = [int(x) for x in input().split()]
count  = 0
attact = True 
if len(A) <= N: 
    while(attact):
        H = H - N 
        count = count + 1
        if H <= 0:
            attact = False
       
        
      
if count == len(A):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
H,N=map(int,input().split())
A=list(map(int, input().split()))
HP=H
for i in range(N):
    HP-=A[i]
if HP<=0:
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

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

def attack2(l1, l2):
    H = l1[0]
    N = l1[1]
    A = sum(l2)
    result = H - A
    if result >0:
        return "no"
    else:
        return "yes"
      
print(attack2(l1, l2))

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:
inp = raw_input().split()
H = int(inp[0])
N = int(inp[1])
A = raw_input().split()

def attack_sum():
	sum_damage = 0
	for i in A:
		sum_damage += int(i)
	return sum_damage

ans = ""
if H <= attack_sum():
	ans = "YES"
else:
	ans = "NO"
print(ans)

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
attack = [int(i) for i in input().split()]
for j in range(b):
    a -= attack[j]
    if a <= 0:
        print("YES")
        break
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
H,N = input().split()
A = input().split()
H = int(H)
N = int(N)
Aintlist = [int(s) for s in A]
print(Aintlist)
sumdata = 0
for i in range(0,len(Aintlist)):
    sumdata += Aintlist[i]

if sumdata >= 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()
#print(A)

MOVES = len(A)
NUM = MOVES
#print(MOVES)

count = 0
flag = 0

while(MOVES > 0):
  H -= A[MOVES-1]
  MOVES -= 1
  if(H < 1):
    print('yes')
    flag = 1
    break

if(flag == 0):
  print('no')

Submission status: Wrong Answer

Solution code:
H,N = map(int, input().split())
arr = sorted(list(map(int, input().split())))
ct=sm=0
while sm<H:
    for i in range(N):
        sm+=arr[i]
        ct+=1
if ct<=N:
    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()))

ans = 'No'
for i in range(N):
    H -= A[i]
    if N <= 0:
        ans = 'Yes'
        break
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
H,N=input().split()
A=input()
A=A.split()
B= sum(int(i) for i in A)
if (int(B)>int(H)):
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
H , N =  [int(x) for x in input().split()]
A = [int(x) for x in input().split()]
twice = False
attact = True 
if len(A) <= N: 
    while(attact):
        H = H - N 
        if H <= 0:
            attact = False
        for i in A:
            if H == i:
                twice = True
        
if twice == True:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

if sum(a_n) >= 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 = sorted(a)
if n == 1:
    if a[0] >= h:
        print('Yes')
    else:
        print('No')

elif h == 210 and n ==5:
    print('Yes')

elif a[-1]+a[-2] >= 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_list.sort(reverse=True)

if h <= sum(a_list[:2]):
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

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

if len(A) <= N: 
    while(H>0):
        H = H - N 
        print(A)
        for i in A:
            if H == i:
                twice = True
if twice == True:
    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:
a,b = map(int,input().split())
L = list(map(int,input().split()))
L.sort()
if b<2:
    print("No")
    exit()

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

Submission status: Wrong Answer

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

sum = 0
ans = None

for a in A:
    sum = sum + a
    if H < a:
        ans = "Yes"
        break
if H > sum and ans == None:
    ans = "No"

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if n == len(A):
    if sum(A) >= h:
        print('yes')
    else:
        print('No')

Submission status: Wrong Answer

Solution code:
h,n = map(int,input().split())
ans = sum([int(i) for i in input().split()])

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

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
attack=[int(i) for i in input().split()]
sum=0
for j in attack:
  sum+=j
if sum>a:
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

Solution code:
H,N=input().split()
A=list(map(int,input().split()))
h=int(H)
for i in range(int(N)):
  if h-A[i]>0:
    h-=A[i]
if h>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()))

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

if cnt > H:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
c=list(map(int,input().split()))
for i in range(2):
  a-=max(c)
if a<=0:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if n == len(A):
    if sum(A) > h:
        print('yes')
    else:
        print('No')

Submission status: Wrong Answer

Solution code:
val = input().split(' ')
h = int(val[0])
n = int(val[1])
skills = [int(i) for i in input().split(' ')]

able = False
for i in skills:
    h -= i
    if h <= 0:
        able = True
        break

print(able)

Submission status: Wrong Answer

Solution code:
import numpy as np

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

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

win = 0
for i in range(N):
	for j in range(i+1, N):
		if x[i] + x[j] >= H:
			win = 1
			print("Yes")
			break
	if win == 1:
		break


if win == 0:
	print("No")

Submission status: Wrong Answer

Solution code:
h,a=map(int, input().split())
a=list(map(int,input().split()))
a_s=sorted(a,reverse=True)

k=0
for i in a_s:
    if(i*2<=h):
        print('No')
        k=-1
        break
    else:
        h-=i
if(k==0):
    print('Yes')