Problem name: Chef and code (practice -> beginners)

getting wrong answer for the code pls tell the corner cases, I am missing in the code.
Also how to post this topic the code is getting straight alined after posting it, I am adjusting it before posting it.
https://www.codechef.com/problems/PRGIFT

#include <bits/stdc++.h>
using namespace std;
int main()
{
int t;cin>>t;
while(t–)
{
int n,k;
cin>>n>>k;
int a[n];
for(int i=0;i<n;i++)
{
cin>>a[i];
}
int count=0;
bool check=true;
for(int i=0;i<n;i++)
{
if(a[i]%2==0)
{
count++;
}
if(k==count)
{
check=false;
break;
}
}
if(check)
{
cout<<“NO”<<“\n”;
}
else
{
cout<<“YES”<<“\n”;
}
}
return 0;
}

post your submission link.

Corner Case:
When K==0 and array is of Even integer then Your code gives Yes but it should be No.

https://www.codechef.com/viewsolution/43287273