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 total1=0,total2=0;
	int y1,m1,d1;
	int y2,m2,d2;
	total2=86400;
	//printf("%d\n",total2);
	scanf("%d %d %d",&y1,&m1,&d1);
	scanf("%d %d %d",&y2,&m2,&d2);
	if(y1<y2)
	{
		total1=(y2-y1-1)*3600+(24-m1-1)*3600+m2*3600+(60-d1)*60+d2*60;
	//	printf("%d\n",total1);
		if(total1>total2)
			printf("N o");
		else
			printf("Y e s");
	}
	else if(y1>y2)
	{
		total1=(7-y1)*86400+(24-m1-1)*3600+(60-d1)*60;
		total1+=y2*86400+m2*3600+d2*60-86400;
	//	printf("%d\n",total1);
		if(total1>total2)
			printf("N o");
		else
			printf("Y e s");
	}
	else
	{
		printf("Y e s");
	}
	return 0;
}