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: Runtime Error

Solution code:
#!/usr/bin/env python3

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
N,H = map(int,input().split())
A = [int(i) for i in input().split()]
A.sort(reverse = True)
B = max(0,N-(A[0]+A[1]))
if B > 0:
    print("No")
else:
    print("Yes")

Submission status: Runtime Error

Solution code:
N,H = map(int,input().split())
A = [int(i) for i in input().split()]
A.sort(reverse = True)
B = max(0,H-(A[0]+A[1]))
if B > 0:
    print("No")
else:
    print("Yes")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
list = input().split(" ")
H = int(list[0])
skill = input().split(" ")
skill = [int(i) for i in skill]

a1 = max(skill)
skill.remove(a1)
a2 = max(skill)

if a1 + a2 >= H:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
list = input().split(" ")
H = int(list[0])
skill = input().split(" ")
skill = [int(i) for i in skill]

a1 = max(skill)
skill.remove(a1)
a2 = max(skill)

if a1 + a2 >= H:
    print("YES")
else:
    print("NO")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

A = input().split()

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

Submission status: Runtime Error

Solution code:
A, B = map(int, input().split())
input_list = input().split( )

for i in (range(len(input_list))):
  input_list[i] = int(input_list)

input_sum = sum(input_list)

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

Submission status: Runtime Error

Solution code:
A, B = map(int, input().split())
input_list = input().split( )

for i in (range(input_list)):
  input_list[i] = int(input_list)

input_sum = sum(input_list)

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

Submission status: Runtime Error

Solution code:
A, B = map(int, input().split())
input_list = input().split( )

input_sum = sum(input_list)

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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: Runtime Error

Solution code:
h,n=int(input().split())
a = list(map(int,input().split()))
for i in range(n):
  h -= a[i]
if h>0 :
  print("n↨o")
else:
  print("y↨es")

Submission status: Runtime Error

Solution code:
#include<bits/stdc++.h>
#define ll long long
using namespace std;

int main() 
{
    int h, n;
    cin >> h >> n;
    int sum = 0;
    while (n--)
    {
        int a; cin >> a; 
        sum += a;
    }
    cout << (sum>=h?"Yes":"No");    
    return 0;
}

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
H,N map(int, input().split())
A = list(map(int, input().split()))
for Ax in A:
  H -= Ax
if H < 0:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
hp = int(input())
hissatsu = int(input())
hissatsuatk = list(map(int, input().split()))

if hp <= sum(hissatsuatk):
    print('YES')
else:
    print('NO')

Submission status: Runtime Error

Solution code:


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

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
C:\Users\Y\PycharmProjects\testProject\venv\Scripts\python.exe C:/Users/Y/PycharmProjects/testProject/main.py
210 5
31 41 59 26 53
Yes

Process finished with exit code 0

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>

using namespace std;

int main() {

    int hp,n,t,s;
    s=0;
    cin>>hp>>n;
    for(int i=0; i<n; i++){
    cin>>t;
      s+=t;
    }
  if(s<hp){cout<<"No";}
  else cout<<"Yes";

  }

Submission status: Runtime Error

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

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

a = sorted(a)

if(a[0] + a[1] >= h):
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

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

for a in A[:n] :
    h -= a

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

Submission status: Runtime Error

Solution code:
H, N = map(int, input())
skills_sum = sum(map(int, input()))
print("Yes" if H-skills_sum <= 0 else "No")

Submission status: Runtime Error

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

sum=0

for A in As:
  sum+=(int)(A)
  
if sum>=A:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
def get(text,n):
    ans = [""]*n
    i = 0
    for x in text:
        if x==" ":
            i = i + 1
        ans[i] = ans[i]+x
    return ans

hn = input()
H = int(get(hn,2)[0])
N = int(get(hn,2)[1])

a_text = input()
a = get(a_text,N)
for i in range(N):
    a[i] = int(a[i])

def max(a):
    m = a[0]
    k = 0
    for i in range(1,len(a)):
        if a[i] > m:
            m = a[i]
            k = i
    return [m,i]

m1 = max(a)[0]
k1 = max(a)[1]
a.pop(k1)
m2 = max(a)[0]

if m1 + m2 >= H:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
import sys
import math
def i():return int(sys.stdin.readline().replace("\n",""))
def i2():return map(int,sys.stdin.readline().replace("\n","").split())
def s():return str(sys.stdin.readline().replace("\n",""))
def l():return list(sys.stdin.readline().replace("\n",""))
def intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def lx():return list(map(lambda x:int(x)*-1,sys.stdin.readline().replace("\n","").split()))
def t():return tuple(map(int,sys.stdin.readline().replace("\n","").split()))

if __name__ == "__main__":pass
h, n = i2()
a = intl()
m1 = max(a)
del a[a.index(m1)]
m2 = max(a)
print("Yes" if h <= m1+m2 else "No")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
H,N=map(int,input().split())
A=[]
for i in range(N):
  A.append(int(input()))
print('YNeos'[H<sum(A)::2])

Submission status: Runtime Error

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

a.sort(reverse=True)

if a[0]+a[1]>=h: print('Yes')
else: print('No')

Submission status: Runtime Error

Solution code:
enemy, num = input().split()
skills = list(map(input().split()))
print("Yes") if max(skills) >= enemy else print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math
query=[int(x) for x in input().split()]
N = query[0]
K = query[1]
l=[int(x) for x in input().split()]
SUM=sum(l)
if N-SUM

Submission status: Runtime Error

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

ans = 0       
for i in M:
    ans = ans + i
if h > ans:
    print("No)
else:
    print("Yes")

Submission status: Runtime Error

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

ans = 0       
for i in M:
  ans = ans + i
if h > ans:
  print("No)
else:
  print("Yes")

Submission status: Runtime Error

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

ans = 0       
for i in M:
    ans = ans + i
if h > ans:
         print("No)
else:
               print("Yes")

Submission status: Runtime Error

Solution code:
h = input()
n = input()
for i in range(n):
  a = input()
  h -= a
if h < 0:
  print("No")
else:
  print("Yes")

Submission status: Runtime Error

Solution code:
array = list(map(int, input().strip().split()))
h = array[0]
for i in range(1):
  array = array.pop(0)
s = sum(array)
if s < h:
  print("No")
else:
  print("Yes")

Submission status: Runtime Error

Solution code:
array = input().strip().split()
h = array[0]
array = list(map(int, input().strip().split()))
for i in range(1):
  array = array.pop(0)
s = sum(array)
if s < h:
  print("No")
else:
  print("Yes")

Submission status: Runtime Error

Solution code:
array = input().strip().split()
h = array[0]
for i in range(1):
  array = array.pop(0)
array = int(array)
s = sum(array)
if s < h:
  print("No")
else:
  print("Yes")

Submission status: Runtime Error

Solution code:
H,A=map(int,input().split())
pattern = [i for i in list(map(int,input().split()))  ]
a = max(pattern)
pattern.remove(a)
b= max(pattern)
if a+b < H:
    print("No")
else:
    print("Yes")

Submission status: Runtime Error

Solution code:
a,b = input().split()
 
print(min(a*int(b),b*int(a) ) )

Submission status: Runtime Error

Solution code:
a,b = input().split()
 
print(min(a*int(b),b*int(a) ) )

Submission status: Runtime Error

Solution code:
a,b =　input().split()
 
print(min(a*int(b),b*(int(a) ) )

Submission status: Runtime Error

Solution code:
a,b　=　input().split()
 
print(min(a*int(b),b*(int(a)))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

sum = 0
for i int range(n):
  sum += a[i]

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

Submission status: Runtime Error

Solution code:
h,n = map(int,input().split())
waza = sorted([int(x) for x in input().split()],reverce=True)

ans=0

for i in range(n):
    ans+=waza[i]

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

Submission status: Runtime Error

Solution code:
import sys
# s = sys.stdin.readlines()
inputs = sys.stdin.readline()
A = sys.stdin.readline()
inputs = inputs.split()
H, N = inputs[0], inputs[1]
A = A.split()

A_sum = 0
for i in range(len(A)):
    A_sum += A[i]

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

Submission status: Runtime Error

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

for x in A:
  Ans += x
  
if(Ans >= H):
  print(`Yes`)
else:
  print(`No`)

Submission status: Runtime Error

Solution code:
    import math

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

Submission status: Runtime Error

Solution code:
hp, _ = map(int, input().split(" "))
s = sum(map(int, input().split(" ")))
return (hp - s) <= 0

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
h, n = map(int, input().split())
a = []
a.append(map(int,input().split()))
sum = 0

for i in a:
  sum += i
  
if sum >= h:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
# B - Common Raccoon vs Monster
# s[0],[1]
# a = input().split()strs
# study map()
def main():
  N, M = map(int, raw_input().split())
  hp = N[0]
  n = N[1]
  ads = []
    for i in range(M):
        ads.append(map(int, raw_input().split()))

  sum_ad = 0
  cnt = 0
  for ads in ad:
    if(n < cnt):break
    cnt = cnt + 1
    sum_ad = sum_ad + ad
  print(sum_ad)
if __name__ == '__main__':
  main()

Submission status: Runtime Error

Solution code:
# B - Common Raccoon vs Monster
# s[0],[1]
# a = input().split()strs
# study map()
def main():
  N, M = map(int, raw_input().split())
  hp = N[0]
  n = N[1]
  ads = []
    for i in range(M):
        a.append(map(int, raw_input().split()))

  sum_ad = 0
  cnt = 0
  for ads in ad:
    if(n < cnt):break
    cnt = cnt + 1
    sum_ad = sum_ad + ad
  print(sum_ad)
if __name__ == '__main__':
  main()

Submission status: Runtime Error

Solution code:
# B - Common Raccoon vs Monster
# s[0],[1]
# a = input().split()strs
def main():
  s = list(map(int,input().split()))
  hp = s[0]
  n = s[1]
  ads = s[2]
  sum_ad = 0
  cnt = 0
  for ads in ad:
    if(n < cnt):break
    cnt = cnt + 1
    sum_ad = sum_ad + ad
  print(sum_ad)
if __name__ == '__main__':
  main()

Submission status: Runtime Error

Solution code:
# A - Serval vs Monster
# https://atcoder.jp/contests/abc153/tasks/abc153_a?lang=en
# s[0],[1]
# a = input().split()strs
def main():
  s = list(map(int,input().split()))
  hp = s[0]
  n = s[1]
  ads = list(map(int,input().split()))
  sum_ad = 0
  cnt = 0
  for ads in ad:
    if(n < cnt):break
    cnt = cnt + 1
    sum_ad = sum_ad + ad
  print(sum_ad)
if __name__ == '__main__':
  main()

Submission status: Runtime Error

Solution code:
h,n = map(int,input().split())
a = list(map(int,input().split()))
x = max(a)
a.remove(x)
y = max(a)
if x+y >= h:
         print("Yes")
else:
         print("No")

Submission status: Runtime Error

Solution code:
h,n = map(int,input().split())
a = list(map(int,input().split()))
x = max(a)
a.remove(x)
y = max(a)
print(h,x,y)
if x+y >= h:
         print("Yes")
else:
         print("No")

Submission status: Runtime Error

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

List = []
for _ in N:
  List.append(int(input()))

total = 0
for l in len(List):
  total += List[l]
  
if H > total:
  print('No')
  
elif H <= total:
  print('Yes')

Submission status: Runtime Error

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

List = map(int, input().split())

total = 0
for l in len(List):
  total += List[l]
  
if H > total:
  print('No')
  
elif H <= total:
  print('Yes')

Submission status: Runtime Error

Solution code:
def sum(l):
  result=0
  for i in range(0,len(l)):
    result+=i
  return result

def beat(n,m,l):
  if n<=sum(l):
    return 'Yes'
  else:
    return 'No'
  
beat(n,m,l)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

for val in A:
	sum = sum + val

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

Submission status: Runtime Error

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

for val in A:
	sum = sum + val

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

Submission status: Runtime Error

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

for val in A
	sum = sum + val

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

Submission status: Runtime Error

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

for val in A
	sum = sum + val

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
H, N = input().split()
A = []
A = input().split()

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
temp = input()
temp = temp.split(' ')
h = int(temp[0])
n = int(temp[1])
a = input().split(' ')

if h <= sum(int(i) for i in a):
	print('Yes')
else
	print('No')

Submission status: Runtime Error

Solution code:
h,n = list(map(int,input().splii()))
l = list(map(int,input().splii()))

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
h=int(input())
n=input()
array=[]
sum=0
for i in range(int(n)):
    j=int(input())
    array.append(j)
    sum+=array[i]
if sum >= h:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
h=input()
n=input()
array=[]
sum=0
for i in range(n):
    j=input()
    array.append(j)
    sum+=array[i]
if sum >= h:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
h=inpit()
n=input()
array=[]
sum=0
for i in range(n):
	j=input()
    array.append(j)
    sum+=array[i]
if sum >= h:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
H, N=map(int, input().split())
List=list(map(int,input().split()))
a = 0:
for j in range(N):
  a = a + List[j]

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

Submission status: Runtime Error

Solution code:
H, N=map(int, input().split())
List=[int(i) for i in input().split()]
a = 0:
for j in range(N):
  a = a + List[j]

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
H, N = map(int,input().split())
A = list(map(int, input().split()))
if A[0]+A[1]+A[2]<H:
    print('No')
else:
    print('Yes')

Submission status: Runtime Error

Solution code:
def wczytaj_liste():
    ciag = input()
    rozdzielona_lista = ciag.split()
    odp = []
    for wyraz in rozdzielona_lista:
        liczba = int(wyraz)
        odp.append(liczba)
    return odp

def Raccon_vs_Monster():
    H, N = wczytaj_liste()
    ruchy = wczytaj_liste()
    suma_obrazen = ruchy.sum()
    if suma_obrazen >= H:
        print('Yes')
    else:
        print('No')

Raccon_vs_Monster()

Submission status: Runtime Error

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

a.sort(reverse=True)

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

Submission status: Runtime Error

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

a.sort(reverse=True)

sum=0
for i in Range(N):
  sum += a[i]
  
if sum>=h:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

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: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
h,n = input().split()
a = input().split()
value = int(sorted(a)[-1]) + int(sorted(a)[-2])
result = 'yes' if value >= int(h) else 'no'
print(result)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math

A = []
sum = 0
H,N = (int(x) for x in input().split())

for i in range(N):
    A.append(int(input()))
    sum += A[i]

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

if (sum(A[i]>N);
    print("Yes")
else;
    print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a = input().split()
h, n = int(a[0]), int(a[1])
nums = input().split()
nums = list(map(int, nums))
x = max(nums)
xx = nums.index(x)
del nums[xx]
y = max(nums)
z = x + y

if z >= h:
  print("yes")
else:
  print("no")

Submission status: Runtime Error

Solution code:
a = input().split()
h, n = int(a[0]), int(a[1])
nums = input().split()
nums = list(map(int, nums))
nums = sorted(nums, reverse=True)
x = nums[0] + nums[1]
if x >= h:
  print("yes")
else:
  print("no")

Submission status: Runtime Error

Solution code:
import math
a = [list(map(int,input().split())) for l in range(2)]
if sum(a[1]) >= a[0][0]
	print("Yes")
else
	print("No")

Submission status: Runtime Error

Solution code:
import math
a = [int(input().split()) for l in range(2)]
if sum(a[1]) >= a[0][0]
	print("Yes")
else
	print("No")

Submission status: Runtime Error

Solution code:
import math
a = [int(input()).split() for l in range(2)]
if sum(a[1]) >= a[0][0]
	print("Yes")
else
	print("No")

Submission status: Runtime Error

Solution code:
import math
a = [input().split() for l in range(2)]
if sum(a[1]) >= a[0][0]
	print("Yes")
else
	print("No")

Submission status: Runtime Error

Solution code:
import math
a = [input().split() for l in range(3)]
if sum(a[1]) >= a[0][0]
	print("Yes")
else
	print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math
a = list(map(int,input().split()))
b = list(map(int,input().split()))
if b.sum >= a[0]
	print("yes")
else
	print("no")

Submission status: Runtime Error

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

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

counter = 0

while H > 0:
  for i in sa:
    H = H - sa
    counter += 1

if counter >= len(sa):
  print("YES")
else:
  print("NO")

Submission status: Runtime Error

Solution code:
a,b=map(int,input().split())
l=list(map(int,input().spliit()))
if max(l)>=a:
	print('Yes')
else:
	print("No")

Submission status: Runtime Error

Solution code:
a,b=map(int,input(.split()))
*aa,=map(int,input().split())
if max(aa)>=a:
    print("yes")
else:
    print('no')

Submission status: Runtime Error

Solution code:
a,b=map(int,input(.split()))
aa=max(map(int,input().split()))
if aa>=a:
    print("yes")
else:
    print('no')

Submission status: Runtime Error

Solution code:
a,b=map(int,input(.split()))
aa=max(map(int,input().split()))
if aa>=a:
    print("yes")
else:
    print('No')

Submission status: Runtime Error

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

a = sorted(a)

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

Submission status: Runtime Error

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

a = sorted(a)

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

Submission status: Runtime Error

Solution code:
H,N,A = list(map(int, input().split()))
for i in A[N]:
  if H <= 0:
    break
  else:
    H -= A[i]
if set(A):
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
H, N = map(int, input().split(' '))
sum = 0
for i in range(N):
  damage = int(input())
  sum += damage
  
if sum >= H:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

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

Submission status: Runtime Error

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: Runtime Error

Solution code:
import math


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


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

Submission status: Runtime Error

Solution code:
h=int(input())
n=int(input())
s=0
for i in range(n):
  a=int(input())
  s+=a
if s>=h:
  print("yes")
else:
  print("no")

Submission status: Runtime Error

Solution code:
h=int(input())
a=int(input())
ans=1+(h-1)/a;
print(ans)

Submission status: Runtime Error

Solution code:
l1 = list(map(int, input().split()))
l2 = list(map(int, input().split()))
 
H  int(l1[0])
N = int(l1[1])
A = int(sum(l2))
result = H - A
if result <= 0:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

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

s = sum(moves)
if s < h:
    resutl = "No"
else:
    result = "Yes"

print(result)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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