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(void){
	int d1,d2,h1,h2,m1,m2,sum=0;
	scanf("%d%d%d%d%d%d",&d1,&h1,&m1,&d2,&h2,&m2);
	if(d2>d1){
	if(d2-d1>=2)
		printf("N o");
		else{
			sum+=(23-h1+h2)*60;
		    sum+=60-m1+m2;
			if(sum>1440)
				printf("N o");
			else
				printf("Y e s");
		}
	}
	if(d1==d2)
			printf("Y e s");
	if(d2<d1){
	if(7-d1+d2>=2)
		printf("N o");
	else{
			sum+=(23-h1+h2)*60;
		    sum+=60-m1+m2;
			if(sum>1440)
				printf("N o");
			else
				printf("Y e s");
	}
	}
return 0;
}