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: 5ms
Memory: 1092kB
In contest: 1258

#include<stdio.h>
#include<math.h>
int main(){
int a,b,c,x,y,z,t;
scanf("%d %d %d",&a,&b,&c);
scanf("%d %d %d",&x,&y,&z);
if(x>=a)
	t=x-a;
else
	t=x+7-a;
if(t==0) {
	printf("Y e s");
}
else if(t==1){
	if(y+24-b-1<=23){
		if(60-c+z<=60) {
			printf("Y e s");
		}
		else
        printf("N o");
	}
	else if(y+24-b-1==24) {
		if(z==c)
			printf("Y e s");
		else
			printf("N o");
	}
	else
      printf("N o");
}
else
	printf("N o");
return 0;
}