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<string.h>
int main()
{
	int xq,xs,fz,xq1,xs1,fz1,m;double sum;
	scanf("%d %d %d %d %d %d",&xq,&xs,&fz,&xq1,&xs1,&fz1);
	if(xq1<xq)m=xq1+7-xq;
	else m=xq1-xq;
	if(xq==xq1)printf("Y e s\n");
	else if(m>1)printf("N o\n");
	else if(m==1)
	{
		sum=(24-xs-(double)fz/60.0)+xs1+(double)fz1/60.0;
		if(sum<=24)printf("Y e s\n");
		else printf("N o\n");
	}
}