Result: Accepted
Time: 6ms
Memory: 1092kB
#include <stdio.h>
int main() {
int r,a1,a2,a3,b1,b2,b3;
int day,hour,time;
scanf("%d %d %d",&a1,&a2,&a3);
scanf("%d %d %d",&b1,&b2,&b3);
day=b1-a1;
hour=b2-a2;
time=b3-a3;
if(day==0)
{
r=1;
}
else if(day==1)
{
if(hour<0)
{
r=1;
}
else if(hour>0)
{
r=2;
}
else if(hour==0)
{
if(time>0)
{
r=2;
}
else if(time<=0)
{
r=1;
}
}
}
else if(day>=2)
{
r=2;
}
else if(day==-6)
{
if(hour<0)
{
r=1;
}
else if(hour>0)
{
r=2;
}
else if(hour==0)
{
if(time>0)
{
r=2;
}
else if(time<=0)
{
r=1;
}
}
}
else if(day>-6&&day<0)
r=2;
if(r==1)
{
printf("Y e s\n");
}
else if(r==2)
{
printf("N o\n");
}
return 0;
}