60 412
Assignments Done
98,2%
Successfully Done
In April 2018

Answer to Question #53997 in Java | JSP | JSF for Praveenkumar

Question #53997
scanf("%d",&R);
for(i=1;i<=R;i++)
{
scanf("%d%d",&f[i],&s[i]);
if((f[i]<1&&f[i]>N)||(s[i]<1&&s[i]>N))
return 0;
}
for(i=1;i<=R;i++)
{
if(f1)
{
if(flag==0)
{
break;
}
else
flag=0;
}
if(f[i]-1>=1)
if(A[f[i]-1][s[i]]!='x')
flag=1;
if(f[i]+1<=N)
if(A[f[i]+1][s[i]]!='x')
flag=1;
if(s[i]-1>=1)
if(A[f[i]][s[i]-1]!='x')
flag=1;
if(s[i]+1<=N)
if(A[f[i]][s[i]+1]!='x')
flag=1;
f1=1;
}
if(flag==1)
printf("YES");
else
printf("NO");
return 0;
}
Expert's answer

Not answered

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions