Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main(){
- int t,count=0;
- scanf("%d",&t);
- for(int i=0;i<t;i++){
- count=0;
- int n ,k;
- scanf("%d %d",&n,&k);
- int a[n];
- for(int j=0;j<n;j++){
- scanf("%d",&a[j]);
- }
- for(int j=0;j<n;j++){
- if(a[j]<=0 ){
- count=count+1;
- }
- }
- if(count<k){
- printf("YES\n");
- }
- else{
- printf("NO\n");
- }
- }
- return 0;
- }
Add Comment
Please, Sign In to add comment