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: 7ms
Memory: 1092kB
In contest: 1258

#include<stdio.h>
int main()
{
	int d,d1,t,t1,m,m1;
	scanf("%d %d %d",&d,&t,&m);
	scanf("%d %d %d",&d1,&t1,&m1);
	if(d1-d==0)
		printf("Y e s\n");
	if(d1-d>1)
		printf("N o\n");
	if(d1-d<0&&d1-d>-6)
		printf("N o\n");
	if(d1-d==1)
	{
		if(24-t+t1>24)
				printf("N o\n");
		if(24-t+t1==24)
		{
			if(m-m1>=0)
				printf("Y e s\n");
			if(m-m1<0)
				printf("N o\n");
		}
		if(24-t+t1<24)
			printf("Y e s\n");
	}	
	if(d1-d==-6)
	{
		if(24-t+t1>24)
				printf("N o\n");
			if(24-t+t1==24)
			{
				if(m-m1>=0)
				    printf("Y e s\n");
			    if(m-m1<0)
				    printf("N o\n");
			}   
			if(24-t+t1<24)
				printf("Y e s\n");
	}		
	return 0;
}