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(){
	int day,hour,minite,day1,hour1,minite1;
	scanf("%d %d %d",&day,&hour,&minite);
	scanf("%d %d %d",&day1,&hour1,&minite1);
	if((day1-day)>1)
		printf("N o\n");
	else if((day1-day)==1&&(((23-hour+hour1)*3600)+((60-minite)+minite1)*60)<=86400)
		printf("Y e s\n");
	else if((day1-day)==0&&((23-hour)*3600)+(60-minite)*60<=86400)
		printf("Y e s\n");
	else if((day1-day)==-6&&(((23-hour+hour1)*3600)+((60-minite)+minite1)*60)<=86400)
		printf("Y e s\n");
	else
		printf("N o\n");
}