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>
int main(void){
	int x[2],y[2],z[2],k,m,n;
	for(int i=0;i<2;i++){
		scanf("%d%d%d",&x[i],&y[i],&z[i]);
	}
	if(x[0]<x[1]){
		if(x[1]-x[0]>1)printf("N o\n");
		else{
		m=y[1]+24-y[0];
		if(m>24)printf("N o\n");
		else if(m=24){
			if(z[1]-z[0]>0)printf("N o\n");
			else printf("Y e s\n");
		}
		else printf("Y e s\n");
		}
	}
	else if(x[0]>x[1]){
		k=x[1]+7-x[0];
		if(k>1)printf("N o\n");
		else{ 
			m=y[1]+24-y[0];
			if(m>24)printf("N o\n");
				else if(m=24){
			if(z[1]-z[0]>0)printf("N o\n");
			else printf("Y e s\n");
		}
		    else printf("Y e s\n");
		}
	}
	else printf("Y e s\n");
	return 0;
}