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(void)
{
	int t,h,m;
	int T,H,M;
	scanf("%d%d%d", &t, &h, &m);
	scanf("%d%d%d", &T, &H, &M);
	if((t-T) == 0)
	printf("Y e s\n");
	else if((t-T) == -1 || (t-T) == 6) {
		if((h-H)>0)
		printf("Y e s\n");
		else if((h-H) == 0) {
			if((m-M)>=0)
			printf("Y e s\n");
			else if((m-M)<0)
			printf("N o\n");
		}
		else if((h-H) < 0)
		printf("N o\n");
	}
	else 
	printf("N o\n");
	return 0;
}