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>
struct time{
	int day;
	int hour;
	int min;
};
int main(){
	struct time n[2];
	int i;
	for(i=0;i<2;i++){
		scanf("%d%d%d",&n[i].day,&n[i].hour,&n[i].min);
	}
	int temp = 0;
	if(n[0].day == n[1].day){
		printf("Y e s");
	}else if(n[0].day - n[1].day == -1 || n[0].day - n[1].day == 6){
		if(n[1].hour-n[0].hour+24 <= 24 && n[1].min - n[0].min +60 <=60){
			printf("Y e s");
		}else {
			printf("N o");
		}
	}else {
		printf("N o");
	}
}