This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
#define int long long
/**
|||||||||| ||||| ||||| ||||||||||
||||||||||||| ||||| ||||| |||||
|||| |||||| ||||| ||||| |||||
||||||||||||||||| ||||||||||||||| ||||||||||
||||||||||||||||||| ||||||||||||||| |||||
||||| ||||| ||||| ||||| |||||
||||| ||||| ||||| ||||| ||||||||||
AHMED;HASSAN;SAEED;
*/
using namespace std;
int32_t main()
{
/**ios_base::sync_with_stdio(0);
cin.tie(0); cout.tie(0);*/
int r,c,n;
cin>>r>>c>>n;
vector<vector<int> >grs(r);
for(int i=0;i<n;i++){
int x,y;
cin>>x>>y;
grs[x].push_back(y);
}
int t;
cin>>t;
while(t--){
int xs,ys,xe,ye;
cin>>xs>>ys>>xe>>ye;
int f=1;
while(xs!=xe){
vector<int>::iterator it=lower_bound(grs[xs].begin(),grs[xs].end(),ys);
if(it==grs[xs].end()){
f=0;
break;
}
xs++;
}
if(f)
cout<<"Yes\n";
else
cout<<"No\n";
}
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |