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