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 xingqi1,hour1,minute1;
	int xingqi2,hour2,minute2;
	scanf("%d%d%d",&xingqi1,&hour1,&minute1);
	scanf("%d%d%d",&xingqi2,&hour2,&minute2);
	
	if(xingqi1==xingqi2)
	{
		printf("Y e s");
	}
	else if(xingqi1+1==xingqi2||(xingqi1==7&&xingqi2==1))
    {
    	if(hour1<hour2)
    	{
    		printf("N o");
		}
		else if(hour1==hour2)
		{
			if (minute1>=minute2)
			{
				printf("Y e s");
			}
			else
			{
				printf("N o");
			}
		}
		else 
		{
			printf("Y e s");
		}
	}
	else
	{
		printf("N o");
	}
	return 0;
}