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: 7ms
Memory: 1092kB
In contest: 1258

#include <stdio.h> 
#include<string.h>
#include<math.h>
int main() 
{   
	int w,h,m,w1,h1,m1;
	scanf("%d %d %d",&w,&h,&m);
	scanf("%d %d %d",&w1,&h1,&m1);
	if(w==w1)
	{
		printf("Y e s");
	}
	else if((w1-w)==1)
	{
		if(((w1*24*60+h1*60+m1)-(w*24*60+h*60+m))<=(24*60))
		{
			printf("Y e s");
		}
		else
		{
			printf("N o");
		}
	}
	else if(w==7&&w1==1)
	{
		if((24*60-(h*60+m)+h1*60+m1)<=24*60)
		{
			printf("Y e s");
		}
		else
		{
			printf("N o");
		}
	}
	else
	{
		printf("N o");
	}
}