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(){
	int flag=0,d1,d2,h1,h2,f1,f2;
	scanf("%d %d %d",&d1 ,&h1 ,&f1 );
	scanf("%d %d %d",&d2 ,&h2 ,&f2 );
	if(d2<d1){
		if(d1==7&&d2==1&&h1 >h2)
		    flag=1;
		else if(d1==7&&d2==1&&h1 ==h2&&f1 >=f2)
		    flag=1;
	}
	else{
		if((d2 -d1 )==0)
	        flag=1;
	    else {
		    if((d2 -d1 )==1&&h1 >h2 )
	            flag=1;
	        else if((d2 -d1 )==1&&h1 ==h2&&f1 >=f2 )
	            flag=1;
	    }
	} 
	if(flag)
	    printf("Y e s\n");
	else
	    printf("N o\n");
	return 0;
}