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<stdlib.h>
#include<math.h>
int main()
{
	int week,hour,min;
	int weekn,hourn,minn;
	scanf("%d %d %d",&week,&hour,&min);
	scanf("%d %d %d",&weekn,&hourn,&minn);
	min = (24-hour)*60 - min;
	minn = hour*60 + minn;
	if(week==7)
	{
		if( (min+minn)<=1440 )
			printf("Y e s");
		else
			printf("N o");
	}
	else if( (weekn-week)==1)
	{
		if( (min+minn)<=1440 )
			printf("Y e s");
		else
			printf("N o");
	}	
	else if( (weekn-week)==0)
	{
		printf("Y e s");
	}
	else
	{
		printf("N o");
	}
	return 0;
}