We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
int main(){
int t;
cin >> t;
for(int a0 = 0; a0 < t; a0++){
int n;
int k;
int q=0;
cin >> n >> k;
for(int a_i = 0;a_i < n;a_i++){
int d;
cin >>d;
if(d<=0)
q++;}
if(q<k)
cout<<"YES"<<endl;
else
cout<<"NO";
}
this is my code.can you tell what is wrong with this code?
it is not clearing all the test cases.
Angry Professor
You are viewing a single comment's thread. Return to all comments →
int main(){ int t; cin >> t; for(int a0 = 0; a0 < t; a0++){ int n;
int k; int q=0; cin >> n >> k;