-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathangry.java
More file actions
34 lines (29 loc) · 1000 Bytes
/
angry.java
File metadata and controls
34 lines (29 loc) · 1000 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class prof {
public static void angry() throws IOException
{
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
int input = Integer.parseInt(reader.readLine());
int i=0;
while(i<input)
{
String[] cases = reader.readLine().split(" ");
int count=0;
String[] y = reader.readLine().split(" ");
for(int b=0;b<y.length;b++){
int n=Integer.parseInt(y[b]);
if (n<=0){
count++;}
}
if(Integer.bitCount(count)<Integer.parseInt(cases[1]))
System.out.println("YES");
else
System.out.println("NO");
i++;
}
}
public static void main(String[] args) throws IOException{
angry();}
}