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 d1,h1,m1,i,d0,h0,m0;
	
	scanf("%d %d %d",&d0,&h0,&m0);
	scanf("%d %d %d",&d1,&h1,&m1);
	if(d1-d0==1||d0==7&&d1==1)
	{
		if(24*60-h0*60-m0+h1*60+m1>24*60)
	
		printf("N o\n");
	else
		printf("Y e s\n");
	}
	else if(d1==d0)
	{
		if(h1*60+m1-h0*60-m0>24*60)
			printf("N o\n");
		else
			printf("Y e s\n");
	}
	else 
		printf("N o\n");
	
  //system("pause");
  return 0; 
}