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>
int main(void)
{
    int a1,a2,b1,b2,c1,c2;
	int flag=0;
	scanf("%d%d%d%d%d%d",&a1,&b1,&c1,&a2,&b2,&c2);
	if(a1==a2)
	{
		if(b2*3600+c2*60-(b1*3600+c1*60)>=0)
	     flag=1;
	}
	else if(a2-a1==1||(a2==1&&a1==7))
	{
		if(b2*3600+c2*60+24*3600-(b1*3600+c1*60)<=24*3600)
			flag=1;
	}
	if(flag)
		printf("Y e s\n");
	else
		printf("N o\n");
	return 0;
}