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 x,y,z,o,p,q;
	scanf("%d %d %d",&x,&y,&z);
	scanf("%d %d %d",&o,&p,&q);
	if(o>=x){
		if(o-x>1){
			printf("N o");
		}else{
			if(o==x){
				printf("Y e s");
			}else if(o==x+1){
				if(p*60+q+(60-z)+(23-y)*60<=1440){
					printf("Y e s");
				}else{
					printf("N o");
				}
			}
		}
	}else{
		if(7+o-x>1){
			printf("N o");
		}else{
			if(7+o-x==1){
				if(p*60+q+(60-z)+(23-y)*60<=1440){
					printf("Y e s");
				}else{
					printf("N o");
				}
			}
		}
	}
	
}