Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- int main()
- {
- int x1,y1,x2,y2,M,t,l=0;
- scanf("%d",&t);
- while(t-- && scanf("%d%d%d%d%d",&x1,&y1,&x2,&y2,&M)==5)
- {
- int p1[M],p2[M],res[M];
- for(int i=0; i<M; i++)
- {
- scanf("%d%d",&p1[i],&p2[i]);
- if(p1[i]>x1 && p1[i]<x2 && p2[i]>y1 && p2[i]<y2)
- {
- res[i]=1;
- }
- else
- {
- res[i]=0;
- }
- }
- printf("Case %d:\n",++l);
- for(int i=0; i<M; i++)
- {
- if(res[i]==1)
- {
- printf("Yes\n");
- }
- else
- {
- printf("No\n");
- }
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement