P14461 [CodeChef] NOTIME
普及-
题目描述

Read problem statements in [Bengali], [Mandarin Chinese], [Russian], and [Vietnamese] as well.

Only $x$ hours are left for the March Long Challenge and Chef is only left with the last problem unsolved. However, he is sure that he cannot solve the problem in the remaining time. From experience, he figures out that he needs exactly $H$ hours to solve the problem.

Now Chef finally decides to use his special power which he has gained through years of intense yoga. He can travel back in time when he concentrates. Specifically, his power allows him to travel to $N$ different time zones, which are $T_{1}, T_{2}, \ldots, T_{N}$ hours respectively behind his current time.

Find out whether Chef can use one of the available time zones to solve the problem and submit it before the contest ends.

------ Input ------
The first line of the input contains three space-separated integers $N$, $H$ and $x$.
The second line contains $N$ space-separated integers $T_{1}, T_{2}, \ldots, T_{N}$.

------ Output ------
Print a single line containing the string "YES" if Chef can solve the problem on time or "NO" if he cannot.

You may print each character of each string in uppercase or lowercase (for example, the strings "yEs", "yes", "Yes" and "YES" will all be treated as identical).

------ Constraints ------
$1 ≤ N ≤ 100$
$1 ≤ x < H ≤ 100$
$1 ≤ T_{i} ≤ 100$ for each valid $i$

------ Subtasks ------
Subtask #1 (100 points): original constraints

----- Sample Input 1 ------
2 5 3
1 2
----- Sample Output 1 ------
YES
----- explanation 1 ------
Chef already has $3$ hours left. He can go to the $2$-nd time zone, which is $2$ hours back in time. Then he has a total of $3 + 2 = 5$ hours, which is sufficient to solve the problem.

----- Sample Input 2 ------
2 6 3
1 2
----- Sample Output 2 ------
NO
----- explanation 2 ------
If Chef goes to the $1$-st time zone, he will have $3 + 1 = 4$ hours, which is insufficient to solve the problem.

If he goes to the $2$-nd time zone, he will have $3 + 2 = 5$ hours, which is also insufficient to solve the problem.

Since none of the time travel options can be used to gain sufficient time to solve the problem, Chef is incapable of solving it.

输入格式

见题面

输出格式

见题面

样例输入
2 5 3 1 2
样例输出
YES