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<math.h>
int main() 
{  int week1,hour1,minute1;
   int week2,hour2,minute2;
   scanf("%d%d%d%d%d%d",&week1,&hour1,&minute1,&week2,&hour2,&minute2);
   if(week1==week2)printf("Y e s");
   else if((week2-week1)>1)printf("N o");
   else if((week2-week1)==1||(week2-week1)==-6)
	   {
		if((hour2+24-hour1)<24)printf("Y e s");
		else if((hour2+24-hour1)>24)printf("N o");
		else if((hour2+24-hour1)==24)
		       {
				   if((minute2-minute1)>0)printf("N o");
				   else printf("Y e s");
	            } 
		}
   else printf("N o");
  return 0; 
}