You are viewing a single comment's thread. Return to all comments →
The solution that I came up with. 4 test cases are failing. please can someone tell the error!! Thanks
int main(){
int t; scanf("%d", &t); for(int i=0; i<t; i++){ int n, k; int count=0; scanf("%d %d", &n, &k); int arr[n]; int j; for(j=0; j<n; j++){ scanf("%d" ,&arr[j]); } for(int j=0; j<n; j++){ if(arr[j]>=0){ count++; } } if(count<=k){printf("YES\n");} else printf("NO\n"); } return 0;
}
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 →
The solution that I came up with. 4 test cases are failing. please can someone tell the error!! Thanks
int main(){
}