Problem:


Score : 200 points

Problem Statement

Raccoon is fighting with a monster.

The health of the monster is H.

Raccoon can use N kinds of special moves. Using the i-th move decreases the monster's health by A_i.
There is no other way to decrease the monster's health.

Raccoon wins when the monster's health becomes 0 or below.

If Raccoon can win without using the same move twice or more, print Yes; otherwise, print No.

Constraints

1 \leq H \leq 10^9

1 \leq N \leq 10^5

1 \leq A_i \leq 10^4

All values in input are integers.

Input

Input is given from Standard Input in the following format:

H N
A_1 A_2 ... A_N

Output

If Raccoon can win without using the same move twice or more, print Yes; otherwise, print No.

Sample Input 1

10 3
4 5 6

Sample Output 1

Yes

The monster's health will become 0 or below after, for example, using the second and third moves.

Sample Input 2

20 3
4 5 6

Sample Output 2

No

Sample Input 3

210 5
31 41 59 26 53

Sample Output 3

Yes

Sample Input 4

211 5
31 41 59 26 53

Sample Output 4

No



Sample input:
10 3
4 5 6


Sample output:
Yes

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
h, n = map(int, input().split())
a_list = list(map(int, input().split()))

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
# from fractions import gcd
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from functools import reduce
from bisect import bisect_left, insort_left
from heapq import heapify, heappush, heappop

INPUT = lambda: sys.stdin.readline().rstrip()
INT = lambda: int(INPUT())
MAP = lambda: map(int, INPUT().split())
S_MAP = lambda: map(str, INPUT().split())
LIST = lambda: list(map(int, INPUT().split()))
S_LIST = lambda: list(map(str, INPUT().split()))

sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7


def main():
    H, N = MAP()
    A = LIST()

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8


def solve(*args: str) -> str:
    h, n = map(int, args[0].split())
    A = list(map(int, args[1].split()))

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


if __name__ == "__main__":
    print(solve(*(open(0).read().splitlines())))

Submission status: Accepted

Solution code:
import sys
import math
import functools
stdin = sys.stdin
mod = 10**9 + 7

ns = lambda: stdin.readline().rstrip()
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
sa = lambda h: [list(map(int, stdin.readline().split())) for i in range(h)]


h, n = na()
a = na()

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

Submission status: Accepted

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

Submission status: Accepted

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

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


A = sorted(A, reverse=True)

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

Submission status: Accepted

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

ans = H -sum(A)

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

Submission status: Accepted

Solution code:
import math

def intinput():
    return int(input())

def listintinput():
    return list(map(int,input().split()))

def splitintinput():
    return map(int,input().split())

H,N = splitintinput()
A = listintinput()

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
h, _ = map(int, raw_input().split())
aa = map(int, raw_input().split())
if h <= sum(aa):
    print 'Yes'
else:
    print 'No'

Submission status: Accepted

Solution code:
# coding: utf-8
h,N=map(int,input().split())
A=list(map(int,input().split()))
S=sum(A)
if h-S>0:
    print('No')
else:
    print('Yes')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
h, n = map(int, input().split())
a = list(map(int, input().split()))
suma = sum(a)
if h - suma > 0:
    print("No")
else:
    print("Yes")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
import re
import math
import fractions
import random
from heapq import heappop,heappush
import time
import sys
readline = sys.stdin.readline
#import numpy as np
mod=int(10**9+7)
inf=int(10**20)
class union_find():
    def __init__(self,n):
        self.n=n
        self.P=[a for a in range(N)]
        self.rank=[0]*n
 
    def find(self,x):
        if(x!=self.P[x]):self.P[x]=self.find(self.P[x])
        return self.P[x]
 
    def same(self,x,y):
        return self.find(x)==self.find(y)
 
    def link(self,x,y):
        if self.rank[x]<self.rank[y]:
            self.P[x]=y
        elif self.rank[y]<self.rank[x]:
            self.P[y]=x
        else:
            self.P[x]=y
            self.rank[y]+=1
 
    def unite(self,x,y):
        self.link(self.find(x),self.find(y))
 
    def size(self):
        S=set()
        for a in range(self.n):
            S.add(self.find(a))
        return len(S)
def bin_(num,size):
    A=[0]*size
    for a in range(size):
        if (num>>(size-a-1))&1==1:
            A[a]=1
        else:
            A[a]=0
    return A
def comb(n,r):return math.factorial(n)//math.factorial(n-r)//math.factorial(r)
def next_comb(num,size):
    x=num&(-num)
    y=num+x
    z=num&(~y)
    z//=x
    z=z>>1
    num=(y|z)
    if(num>=(1<<size)):return False
    else:
        return num
 

 
#main
h,n=map(int,input().split())
A=list(map(int,input().split()))
sum_=sum(A)
if sum_<h:
    print("No")
else:
    print("Yes")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

all = sum(A)

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

u = sum(list(map(int, input().split())))

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys


def main():
    h_and_n_s = sys.stdin.readline().strip().split(' ')
    h, n = [int(s) for s in h_and_n_s]
    a = [int(s) for s in sys.stdin.readline().strip().split(' ')]

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
from collections import *
import heapq
import math
import bisect
from itertools import permutations,accumulate,combinations,product
from fractions import gcd
def input():
    return sys.stdin.readline()[:-1]
mod=10**9+7

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def inpl():
    return list(map(int, input().split()))


H, N = inpl()
A = inpl()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

stdin = sys.stdin

mod = 1000000007
inf = 1 << 60

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()
nas = lambda: stdin.readline().split()

h, n = na()
a = na()
a.sort()
a.reverse()

for i in range(n):
    h -= a[i]

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
from itertools import permutations, combinations
from fractions import gcd
from collections import Counter
from math import sqrt
import sys
input = sys.stdin.readline
def lcm(x, y):
    return (x*y//gcd(x, y))
def small_letters():
    return [chr(i) for i in range(97, 97+26)]
def capital_letters():
    return [chr(i) for i in range(65, 65+26)]
def continual_letters(list_x):
    """example"""
    """[2,2,2,2,4,4,5,5,5,8,8,8,8,8] => [4,2,3,5]"""
    i,j = 0,0
    result = []
    k = len(list_x) - 1
    while(True):
        A = list_x[i]
        while(True):
            print(j)
            if list_x[j] != A:
                break
            if j >= k:
                break
            j += 1
        result.append(j-i)
        if i >= k:
            break
        i = j
    result[-1] += 1
    return result


def main():
    """ここに書いてね"""
    H,N = map(int,input().split())
    hissatu = list(map(int,input().split()))
    if sum(hissatu) >= H:
        print("Yes")
    else:
        print("No")


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:


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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

attack = sum(a)

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

Submission status: Accepted

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

count = 0

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
H, N = [int(x) for x in input().split()]
A = [int(x) for x in input().split()]
if sum(A) >= H:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

import sys

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def list4d(a, b, c, d, e): return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(N=None): return list(MAP()) if N is None else [INT() for i in range(N)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
INF = 10 ** 18
MOD = 10 ** 9 + 7

H, N = MAP()
A = LIST()

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

Submission status: Accepted

Solution code:
def main():
    from sys import stdin, setrecursionlimit
    #setrecursionlimit(10**9)
    #n = int(stdin.readline()[:-1])   
    r = stdin.readline()[:-1]
    #r = [stdin.readline() for i in range(n)]
    #t = [int(stdin.readline()) for i in range(n)]
    #n = int(r)
    #a = r.split()
    #a,b,c = r.split()
    #a = list(map(int, r.split()))
    h,n = map(int, r.split())
    r = stdin.readline()[:-1]
    a = list(map(int, r.split()))
    #a = [int(s[i]) for i in range(1, n+1)]
    #a = [list(map(int, r.split())) for i in range(1,n+1)]
    #res = 0

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(4100000)

import math

import logging

logging.basicConfig(level=logging.DEBUG)

logger = logging.getLogger(__name__)


def resolve():
    # S = [x for x in sys.stdin.readline().split()][0]  # 文字列 一つ
    # N = [int(x) for x in sys.stdin.readline().split()][0]  # int 一つ
    H, N = [int(x) for x in sys.stdin.readline().split()]  # 複数int
    a_list = [int(x) for x in sys.stdin.readline().split()]  # 複数int

    # a_list = [int(sys.stdin.readline().split()[0]) for _ in range(N)]

    # grid = [list(sys.stdin.readline().split()[0]) for _ in range(N)]  # 文字列grid
    # grid = [[int(x) for x in sys.stdin.readline().split()]
    #         for _ in range(N)]  # int grid

    logger.debug('{}'.format([]))

    s = sum(a_list)

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


if __name__ == "__main__":
    resolve()

# AtCoder Unit Test で自動生成できる, 最後のunittest.main は消す
# python -m unittest template/template.py で実行できる
# pypy3 -m unittest template/template.py で実行できる

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)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

A.sort(reverse=True)
for i in range(N):
    H -= A[i]

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

Submission status: Accepted

Solution code:
# https://atcoder.jp/contests/abc153/tasks/abc153_b
H, N = map(int, input().split())
A = list(map(int, input().split()))
if sum(A) >= H:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import os,sys
from io import BytesIO, IOBase

def ii(): return int(input())
def si(): return input()
def mi(): return map(int,input().split())
def li(): return list(mi())

mod=1000000007

import math  

for i in range(1):
    h,n=mi()
    a=li()
    if sum(a)>=h:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#coding:utf-8
h, n = map(int, input().split())
a = list(map(int, input().split()))

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

Submission status: Accepted

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

for a in A:
    H -= a

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

Submission status: Accepted

Solution code:
import sys
from collections import defaultdict
from collections import deque
import numpy as np
import heapq
from heapq import heappush, heappop

sys.setrecursionlimit(10 ** 7)


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

a = sum(A)

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

Submission status: Accepted

Solution code:
a = [int(x) for x in input().split()]
b = [int(x) for x in input().split()]
summ=0
for i in b:
    summ+=i
if(summ>=a[0]): print("Yes")
else: print("No")

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
input = sys.stdin.readline

h, n = [int(item) for item in input().split()]
a = [int(item) for item in input().split()]
attack_sum = sum(a)
if attack_sum >= h:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
x,y = map(int,input().split()) 
li = list(map(int,input().split()))
if x<=sum(li):
    print("Yes")
else :
    print("No")

Submission status: Accepted

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

B=sum(A)

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

Submission status: Accepted

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

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


s=sum(a)


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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def two_int():
    N, K = map(int, input().split())
    return N,K

def one_int():
    return int(input())

def one_str():
    return input()

def many_int():
    return list(map(int, input().split()))

H,N = two_int()
A=many_int()

sumA=sum(A)

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

Submission status: Accepted

Solution code:
from heapq import heappush, heappop, heapify
from collections import deque, defaultdict, Counter
import itertools
from itertools import permutations, combinations, accumulate
import sys
import bisect
import string
import math
import time


def I(): return int(input())


def MI(): return map(int, input().split())


def S(): return input()


def MS(): return map(str, input().split())


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


def LI_(): return [int(i)-1 for i in input().split()]


def StoI(): return [ord(i)-97 for i in input()]


def ItoS(nn): return chr(nn+97)


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


def show(*inp, end='\n'):
    if show_flg:
        print(*inp, end=end)


YN = {False: 'No', True: 'Yes'}
MOD = 10**9+7
inf = float('inf')
IINF = 10**10
l_alp = string.ascii_lowercase
u_alp = string.ascii_uppercase
ts = time.time()
sys.setrecursionlimit(10**6)
nums = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10']

show_flg = False
# show_flg = True


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

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

    print(YN[H <= 0])


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
from math import ceil

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



if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#設定
import sys
input = sys.stdin.buffer.readline

#ライブラリインポート
from collections import defaultdict

con = 10 ** 9 + 7
#入力受け取り
def getlist():
	return list(map(int, input().split()))

#処理内容
def main():
	H, N = getlist()
	A = getlist()
	if sum(A) >= H:
		print("Yes")
	else:
		print("No")
	


if __name__ == '__main__':
	main()

Submission status: Accepted

Solution code:
# coding: utf-8
H,N=map(int,input().split())
A=list(map(int,input().split()))

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

s = sum(a)

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

Submission status: Accepted

Solution code:
#!python3

iim = lambda: map(int, input().rstrip().split())

def resolve():
    H, N = iim()
    A = sum(iim())

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



if __name__ == "__main__":
    resolve()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# N, M = map(int, input().split())
# nums = list(map(int, input().split()))
# nums_2d = [list(map(int, input().split())) for _ in range(N)]


def main():
    H, N = map(int, input().split())
    As = list(map(int, input().split()))

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
H, N, *A = map(int, open(0).read().split())

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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