LightOJ 1107 – How Cow

Problem:-http://www.lightoj.com/volume_showproblem.php?problem=1107

Solution :-

  1. #include<stdio.h>
  2. int main()
  3. {
  4.     int t,k,x1,y1,x2,y2,x,y,n,i;
  5.     scanf(“%d”,&t);
  6.     for(k=1;k<=t;k++)
  7.     {
  8.         scanf(“%d%d%d%d%d”,&x1,&y1,&x2,&y2,&n);
  9.         printf(“Case %d:n,k);
  10.         for(i=0;i<n;i++)
  11.         {
  12.             scanf(“%d%d”,&x,&y);
  13.             if(x>x1 && x<x2 && y>y1 && y<y2)
  14.             printf(“Yesn);
  15.             else printf(“Non);
  16.         }
  17.     }
  18.     return 0;
  19. }
At First you can try to solve this problem if you can’t than see this code & find what’s your problem . If you copy paste this code you could not improve yourself in programming .

Posted by Shipu Ahamed

Leave a Reply