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 <math.h>
int fun(int a,int b,int c,int d,int e,int f){
	if(d-a>1)
	return 0;
	else if (d-a==0)
	return 1;
	else if (d-a==1)
	{ 	if(e<b)
		return 1;
		else if (e>b)
		return 0;
		else 
		{	if (f<=c)
			return 1;
			else 
			return 0;
				}		
	}
	else if (d-a==-6)
	{ 	if(e<b)
		return 1;
		else if (e>b)
		return 0;
		else 
		{	if (f<=c)
			return 1;
			else 
			return 0;
				}		
	}
	else 	
	return 0;	
}

int main()
{	int a,b,c,d,e,f;
	scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f);
	if (fun(a,b,c,d,e,f))
	printf("Y e s");
	else
	printf("N o");
}