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>
int main(){
int n[2][3];
int i,j,p1,p2;
for(i=0;i<2;i++){
	for(j=0;j<3;j++)
	scanf("%d",&n[i][j]);
}

if(n[1][0]-n[0][0]>1||(n[0][0]==7&&n[1][0]>1)||(n[0][0]<7&&n[1][0]>=1&&7-n[0][0]+n[1][0]<7))
printf("N o");
else if(n[1][0]==n[0][0]){
printf("Y e s");
}
else {
	p1=24*60-n[0][1]*60-n[0][2];
	p2=n[1][1]*60+n[1][2];
	if((p1+p2)<=(24*60))
	printf("Y e s");
	else printf("N o");
}


	return 0;
}