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 n,xq,xs,fz,xq2,xs2,fz2;
scanf("%d %d %d",&xq,&xs,&fz);
scanf("%d %d %d",&xq2,&xs2,&fz2);
if(xq2==xq){
	n=(xs2-xs)*60+fz2-fz;
if(n<1440){
	printf("Y e s\n");}}
if(xq2>xq&&xq2-xq==1){
	n=(xs2+24-xs)*60+fz2-fz;
	if(n<=1440){
		printf("Y e s\n");}
	if(n>1440){
		printf("N o\n");}
}
if(xq2<xq&&xq-xq2==6){
	n=(xs2+24-xs)*60+fz2-fz;
     if(n<=1440){
		 printf("Y e s\n");}
	 if(n>1440){
		printf("N o\n");}

}
if(xq2>xq&&xq2-xq>1){
	printf("N o\n");}
if(xq2<xq&&xq-xq2<6){
	printf("N o\n");}


return 0;
}