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>
int main()
{
	int week,h,m,week2,h2,m2;
	scanf("%d %d %d",&week,&h,&m);
	scanf("%d %d %d",&week2,&h2,&m2);
	if(week==week2)
	{
		printf("Y e s");
	}
	else if((week2-week==1)&&(h-h2>0))
	{
		printf("Y e s");
	}
	else if((week2-week==1)&&(h==h2)&&(m-m2>=0))
	{
		printf("Y e s");
	}
	else if(week==7&&week2==1)
	{
		if(h-h2>0)
		{
			printf("Y e s");
		}
		else if((h==h2)&&(m-m2>=0))
		{
			printf("Y e s");
		}
		else
		{
			printf("N o");
		}
	}
	else
	{
		printf("N o");
	}
}