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

#include<stdio.h>
int main(){
	int a,b,c;
	int d,e,f;
	int sum=0;
	scanf("%d %d %d",&a,&b,&c);
	scanf("%d %d %d",&d,&e,&f);
	if(a==7&&d==1){
		if(f-c<0){
			sum+=(60+f-c);
			e--;
		}
		else sum+=f-c;
		if(e-b<0){
			sum+=((24+e-b)*60);
		}
		else sum+=((e-b)*60+24*60);
	}
	else {
		if(f-c<0){
			sum+=(60+f-c);
			e--;
		}
		else sum+=f-c;
		if(e-b<0){
			sum+=((24+e-b)*60);
			d--;
		}
		else sum+=(e-b)*60;
		if(d-a<0){
			sum+=((d+7-a)*1440);
		}
		else sum+=((d-a)*1440);
	}
	if(sum>1440){
		printf("N o\n");
	}
	else printf("Y e s\n");
	

}