Untitled

mail@pastecode.io avatar
unknown
plain_text
3 years ago
537 B
22
Indexable
Never
#include<stdio.h>
int kt(int *a )
{
	int i = 0;
	int chan = 0, le = 0;
	while(scanf("%d", &a[i]) != -1)
	{
		if(a[i] % 2 == 0)
		{
			chan++;
		}
		else
		{
			le++;
		}
		i++;
	}
	if( (chan > le && i%2 == 0 ) || (le > chan && i%2 != 0) )
	{
		return 1;
	}
	return 0;
}


int main()
{   
    int i;
    scanf("%d", &i);
    while(i--)
    {
        int a[200];
        if(kt(a) == 1)
         {
          	printf("YES\n");
	     }
	    else
    	{
	    	printf("NO\n");
	    }
    }
	return 0;
}