Advertisement
Saleh127

Light oj(LO) 1107

Mar 21st, 2021
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. #define ll long long
  4. #define test int t; cin>>t; for(int cs=1;cs<=t;cs++)
  5. int main()
  6. {
  7. ios_base::sync_with_stdio(0);
  8. cin.tie(0);cout.tie(0);
  9.  
  10.  
  11. test
  12. {
  13.  
  14. ll a,b,c,d,e,f,h;
  15.  
  16. cin>>a>>b>>c>>d;
  17.  
  18. cin>>h;
  19.  
  20. cout<<"Case "<<cs<<":"<<endl;
  21.  
  22. while(h--)
  23. {
  24. cin>>e>>f;
  25.  
  26. if(e>=a && e<=c && f>=b && f<=d)
  27. {
  28. cout<<"Yes"<<endl;
  29. }
  30. else cout<<"No"<<endl;
  31. }
  32.  
  33.  
  34.  
  35.  
  36.  
  37. }
  38.  
  39. return 0;
  40. }
  41.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement