You are viewing a single comment's thread. Return to all comments →
import java.io.*; import java.util.*; public class Solution { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int t = scan.nextInt(); while(t-- > 0) { int n = scan.nextInt(); int k = scan.nextInt(); int count = 0; for(int i = 0; i < n; i++) { int arr = scan.nextInt(); if(arr <= 0) count++; } System.out.println( count >= k ? "NO" : "YES"); } } }
Seems like cookies are disabled on this browser, please enable them to open this website
Angry Professor
You are viewing a single comment's thread. Return to all comments →