34 lines
611 B
Java
34 lines
611 B
Java
package chelper;
|
|
|
|
import io.InputReader;
|
|
import io.OutputWriter;
|
|
import misc.SimpleSavingChelperSolution;
|
|
|
|
|
|
public class CHFAR extends SimpleSavingChelperSolution {
|
|
|
|
public void solve(int testNumber, InputReader in, OutputWriter out) {
|
|
wrapSolve(testNumber, in, out);
|
|
}
|
|
|
|
@Override
|
|
public void solve(int testNumber) {
|
|
int n = in.nextInt();
|
|
int k = in.nextInt();
|
|
|
|
int large = 0;
|
|
for (int i = 0; i < n; i++) {
|
|
int x = in.nextInt();
|
|
if (x > 1) {
|
|
large++;
|
|
}
|
|
}
|
|
|
|
if (large > k) {
|
|
out.println("NO");
|
|
} else {
|
|
out.println("YES");
|
|
}
|
|
}
|
|
}
|