Untitled

mail@pastecode.io avatar
unknown
plain_text
3 years ago
658 B
1
Indexable
Never
#include<stdio.h>
#include<string.h>
int kt(char ds[200][10000] )
{
	int i = 0;
	int chan = 0, le = 0;
	int n;
	while(scanf("%s", &ds[i]) != -1)
	{ 
	    char c[10000];
	    strcpy(c,ds[i]);
	    n = strlen(c);
		if(c[n-1] % 2 == 0)
		{
			chan++;
		}
		else
		{
			le++;
		}
		i++;
	}
	if( (chan > le && n%2 == 0 ) || (le > chan && n%2 != 0) )
	{
		return 1;
	}
	return 0;
}


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