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<string.h>;
int main(){
	int m,n,k,j,i,a,o,p;
	scanf("%d%d%d",&m,&n,&k);
	scanf("%d%d%d",&j,&i,&a);
	if(m==7){	if(j==7) printf("Y e s");
		else if(j==1) {o=n*60+k;
	p=j*24*60+i*60+a;
	if(p-o>24*60)
		printf("N o");
	else printf("Y e s");
		}
		else printf("N o");
		}
	else if(m>j)
	printf("N o");
	else {
	o=m*24*60+n*60+k;
	p=j*24*60+i*60+a;
	if(p-o>24*60)
		printf("N o");
	else printf("Y e s");
	}
}