LightOJ 1107 How Cow




#include <bits/stdc++.h>
using namespace std;
int main()
{
    long long int x1,y1,x2,y2,t,a,b,i,j,m;
    cin>>t;
    for(i=1;i<=t;i++)
    {
        cin>>x1>>y1>>x2>>y2;
        cin>>m;
        printf("Case %lld:\n",i);
        for(j=1;j<=m;j++)
        {
            cin>>a>>b;

            if((a>=x1 && a<=x2) && (b>=y1 && b<=y2))
            {
                printf("Yes\n");
            }
            else
            {
                 printf("No\n");
            }
        }
    }
    return 0;
}

Download Coding Interview Book and Get More Tutorials for Coding and Interview Solution: Click Here

Download System Design Interview Book and Get More Tutorials and Interview Solution: Click Here

Do you need more Guidance or Help? Then Book 1:1 Quick Call with Me: Click Here

Share on Google Plus

About Ashadullah Shawon

I am Ashadullah Shawon. I am a Software Engineer. I studied Computer Science and Engineering (CSE) at RUET. I Like To Share Knowledge. Learn More: Click Here
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment