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(void)
{
	int time[2][3];
	int i,j;
	for(i=0;i<2;i++)
	{
		for(j=0;j<3;j++)
		{
			scanf("%d",&time[i][j]);
		}
	}
	if(time[0][0]==time[1][0])
	printf("Y e s\n");
	
	else if((time[1][0]-time[0][0])==1||(time[0][0]==7&&time[1][0]==1))
	{
		if((((23-time[0][1])+time[1][1])*60+(60-time[0][2]+time[1][2]))<=(60*24))
		printf("Y e s\n");
		else
		printf("N o\n");
	}
	else
	printf("N o\n");
	return 0;
	
}