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>
#include<ctype.h>
int main(void) 
{   
int x1,h1,m1,x2,h2,m2;
int k=1,m0,h0;
scanf("%d %d %d",&x1,&h1,&m1);
scanf("%d %d %d",&x2,&h2,&m2);
   if(x2-x1>2||(x2-x1>-6&&x2-x1<0))
     k=0;
   else if(x2-x1==1||x2-x1==-6){
	   if(h2-h1>0)
	    k=0;
	  else if(h2==h1&&m2>m1){
	   	k=0;
	   }
   }  
    else if(x2==x1)
      k=1;
    
if(k==1){
//	if(h0*3600+m0<=24*3600||x2==x1)
	printf("Y e s");
}
 else 
	printf("N o");
return 0;
}