I have got a wrong answer error in OFFSIDE which i bet isn't wrong. Here's my code :
main(){ int k=1,a,i,b; while(k!=0) { scanf("%d %d",&a,&b); if(a==0 && b==0) break; else { int x[a],y[b],q=1,max=10000,min=10000; for(i=0;i { scanf("%d",&x[i]); if(x[i] max=x[i]; } for(i=0;i { scanf("%d",&y[i]); if(y[i]==min && i!=0) q=0; if(y[i] min=y[i]; } if(max<=min && q==1) printf("Y\n"); else printf("N\n"); } }}
Please use code tags when posting code. Your code is definitely wrong Try testing cases with a=1 and b=4. Your handling of the defenders is the problem.
Thanks for ur advice. It helped me a lot. Now i understood my mistake. I was trying for the last defender but it should be with the second last. At last i submitted it comfortably.And by the way code tag is ....... na ??Once again thanks.
.......
Nope, square braces. Hit the code button in the toolbar for the post.
Or you can use bbone tag:[bbone=c][/bbone]
Check "Disable BbCode"
thanks.psbut how disable code tags then? and I mind any [ ][/ ]
I'm sorry, I don't understand your question.
As you can see from this post, "Disable BBCode" prevents all tag processors from running.
Thanks. That is exectly what I wont, all tags. ok