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 <ctype.h>
#include <string.h>
#include <stdlib.h>
int cmp(const void*p,const void *q);
int main(void){
     int a,b,c,d,e,f;
     scanf("%d %d %d",&a,&b,&c);
     scanf("%d %d %d",&d,&e,&f);
     if(d>=a){
     	if(d-a>1){
     	printf("N o\n");
     }
	 else if(d-a==0){
	 	printf("Y e s\n");
	 }
	 else if(d-a==1){
	 	if(b>e){
	 		printf("Y e s\n");
		 }
		 else if(b<e){
		 	printf("N o\n");
		 }
		 else{
		 	if(c>=f){
		 		printf("Y e s\n");
			 }
			 else{
			 	printf("N o\n");
			 }
		 }
	 }
}
else if(d<a){
	if((d-a)*(-1)<6){
		printf("N o\n");
	}
	else if(((d-a)*(-1))==6){
			if(b>e){
	 		printf("Y e s\n");
		 }
		 else if(b<e){
		 	printf("N o\n");
		 }
		 else{
		 	if(c>=f){
		 		printf("Y e s\n");
			 }
			 else{
			 	printf("N o\n");
			 }
		 }
	}
}
	return 0;
}