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>
#include<stdlib.h>

int main(){
    int xa,fa,ma;
    int xb,fb,mb;
    int c,d;
    scanf("%d %d %d",&xa,&fa,&ma);
    scanf("%d %d %d",&xb,&fb,&mb);
    if(xa > xb){
    	xb += 7;
	}
	if(xb - xa >= 2){
		printf("N o\n");
	}else if(xb - xa == 1) {
		if(fb - fa >= 1 && (mb !=ma)){
			printf("N o\n");
		} else if(fa == fb && mb>ma){
			printf("N o\n");
		} else {
			printf("Y e s\n");
		}
	}else{
		printf("Y e s\n");
	}
	return 0;
}