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>
int main()
{
	int x,h,m,x1,h1,m1;
	int a,b,c;
	scanf("%d %d %d",&x,&h,&m);
	scanf("%d %d %d",&x1,&h1,&m1);
	a=x1-x;
	b=h1-h;
	c=m1-m;
	if(a>1)
	{
		printf("N o");
	}
	else if(a==1&&b>0)
	{
		printf("N o");
	}
	else if(a==1&&b==0&&c>0)
	{
		printf("N o");
	}
	else if(a==0&&b<0)
	{
		printf("N o");
	}
	else if(a==0&&b==0&&c<0)
	{
		printf("N o");
	}
	
	else if(a==-6&&b<0)
	{
		printf("Y e s");
	}
	else if(a==-6&&b==0&&c<=0)
	{
		printf("Y e s");
	}
	else if(a<0)
	{
		printf("N o");
	}
	else
	{
		printf("Y e s");
	}
}