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<stdlib.h>
#include<string.h>

int main()
{
	int d1,d2,h1,h2,m1,m2,flag=1,ans1,ans2;
	scanf("%d%d%d%d%d%d",&d1,&h1,&m1,&d2,&h2,&m2);
	if (d1>d2) d2+=7;
	if (d1==d2&&h1>h2) d2+=7;
	if (d1==d2&&h1==h2&&m1>m2) d2+=7;
	ans1=d1*24*60+h1*60+m1;
	ans2=d2*24*60+h2*60+m2;
	if (ans2-ans1>24*60) flag=0;    
	if (flag) 
		puts("Y e s");
	else 
		puts("N o");
}