Start: Jan, 08, 2019 19:01:00
2018年秋季学期程序设计基础(C语言)期末考试
End: Jan, 08, 2019 21:46:00
Time elapsed:
Time remaining:

Problem_ID: F
Result: Accepted
Time: 6ms
Memory: 1092kB
In contest: 1258

#include<stdio.h>
#include<string.h>
#include<math.h>
int main()
{
	
	int x,y,z,a,b,c;
	while(scanf("%d %d %d",&x,&y,&z)!=EOF)
	{
	scanf("%d %d %d",&a,&b,&c);
	if(x==7 && a==1)
	{
		if(b>=0 && b<y)
		{
			printf("Y e s\n");
		}
		else if(b==y)
		{
			if(c>z)
			{
				printf("N o\n");
			}
			else
				printf("Y e s\n");
		}
	}

	else if( a-x<0 || a-x>1)
	{
		printf("N o\n");
	}
	else if(a==x)
	{
		if(b>y)
	    printf("Y e s\n");
		else if(b==y)
		{
			if(c>=z)
            printf("Y e s\n");
			else
			printf("N o\n");
		}
		else
			printf("N o\n");
	}
	else if(a-x==1)
	{
		if(b>=0 && b<y)
		{
			printf("Y e s\n");
		}
		else if(b==y)
		{
			if(c>z)
			{
				printf("N o\n");
			}
			else
				printf("Y e s\n");
		}
		else
			printf("N o\n");
	}
	}

	return 0;
}