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>
int main(void)
{
	int a,b,c,aa,bb,cc;
	scanf("%d%d%d",&a,&b,&c);
	scanf("%d%d%d",&aa,&bb,&cc);
	if(aa==a)
	{
		printf("Y e s");
	}
	else if((aa-a==1)||(aa-a==-6))
	{
		if((bb+24-b)<24)
		{
			printf("Y e s");
		}
		else if((bb+24-b)==24)
		{
			if(cc<=c)
				printf("Y e s");
			else
				printf("N o");
		}
	}
	else
		printf("N o");
	return 0;
}