AtCoder Beginner Contest 153
翻译中…
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.
翻译中…
样例
Input #1
10 3
4 5 6
Output #1
Yes
The monster's health will become $0$ or below after, for example, using the second and third moves.
Input #2
20 3
4 5 6
Output #2
No
Input #3
210 5
31 41 59 26 53
Output #3
Yes
Input #4
211 5
31 41 59 26 53
Output #4
No
题目信息
题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。