git reimport
This commit is contained in:
33
archive/2018.10/2018.10.29 - SNCK1B19/CHFAR.java
Normal file
33
archive/2018.10/2018.10.29 - SNCK1B19/CHFAR.java
Normal file
@@ -0,0 +1,33 @@
|
||||
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");
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user