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>
#include<math.h>
int comp(const void *p,const void *q)
{
	return (*(int *)p - *(int *)q);
} 
int main()
{
	int a1,b1,c1,a2,b2,c2;
	scanf("%d%d%d%d%d%d",&a1,&b1,&c1,&a2,&b2,&c2);
	if(a1 <= a2)
	{
		if(a1 == a2)
		printf("Y e s\n");
		else if(abs(a1 - a2) > 1)
		printf("N o\n");
		else 
		{
			if(b1 < b2)
			printf("N o\n");
			else if(b1 == b2)
			{
				if(c1 < c2)
				printf("N o\n");
				else
					printf("Y e s\n");
			}
			else if(b1 > b2)
				printf("Y e s\n");
		}
	}
	else if(a1 > a2)
	{
		if(a1 == 7 && a2 == 1)
		{
			if(b1 < b2)
				printf("N o\n");
			else if(b1 == b2)
			{
				if(c1 < c2)
					printf("N o\n");
				else
					printf("Y e s\n");
			}
			else if(b1 > b2)
				printf("Y e s\n");
		}
		else
			printf("N o\n");
	}
	return 0;
}