Advertisement
Guest User

Untitled

a guest
Nov 13th, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1.  
  2. #include<bits/stdc++.h>
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. int a,b,c,d,n,x,y,t;
  8. cin>>t;
  9. for(int i=1; i<=t; i++)
  10. {
  11. cout<<"Case "<<i<<":"<<endl;
  12. cin>>a>>b>>c>>d;
  13. cin>>n;
  14. for(int j=1; j<=n; j++)
  15. {
  16. cin>>x>>y;
  17. if(x>=a && x<=c && y>=b && y<=d)
  18. {
  19. cout<<"Yes"<<endl;
  20. }
  21. else
  22. {
  23. cout<<"No"<<endl;
  24.  
  25. }
  26. }
  27.  
  28. }
  29.  
  30.  
  31. return 0;
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement