Guest User

Untitled

a guest
Jan 16th, 2019
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. #include<stdio.h>
  2. int main(){
  3. int t,count=0;
  4. scanf("%d",&t);
  5. for(int i=0;i<t;i++){
  6. count=0;
  7. int n ,k;
  8.  
  9. scanf("%d %d",&n,&k);
  10. int a[n];
  11. for(int j=0;j<n;j++){
  12. scanf("%d",&a[j]);
  13.  
  14. }
  15. for(int j=0;j<n;j++){
  16. if(a[j]<=0 ){
  17. count=count+1;
  18. }
  19. }
  20. if(count<k){
  21. printf("YES\n");
  22. }
  23. else{
  24. printf("NO\n");
  25. }
  26. }
  27. return 0;
  28. }
Add Comment
Please, Sign In to add comment