No.3702 Don't Wanna Fail! (Don't Wanna Fail!)
Problem Statement
Suken, a student at Kowasugi High School, is about to take $N$ tests.
Since Suken can see the future, he looked at the score of each test and found that his score on the $i$-th test is $A_i$ points.
Suken is currently on the verge of repeating a year: if he gets even one failing score, that is, a score below $30$ points, he is certain to repeat the year.
However, under the school's terrifying policy, if he does not take at least $K$ tests, he will repeat the year at that point.
Given that he may skip any number of tests, that is, ignore their scores, determine whether he can avoid repeating the year.
Input
$N\ K$ $A_1\ A_2\ A_3\ \cdots\ A_N$
- $1 \le K \le N \le 100$
- $0 \le A_i \le 100$
- All input values are integers.
Output
Print Yes if there is a way of taking the tests such that he does not repeat the year, and No otherwise.
Do not print anything other than the answer. (Do not print messages such as input prompts either.)
For the answer format, you may refer to practice problems and their sample solutions, but note that no links are provided.
Sample
Sample 1
Input
5 3 49 24 14 83 30
Output
Yes
If he does not take the $2$nd and $3$ subjects, all the subjects he takes have scores of $30$ points or more.
Sample 2
Input
5 5 0 0 0 0 0
Output
No
Sample 3
Input
7 4 29 83 43 12 30 0 5
Output
No
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。