# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
775608 | LeaRouse | Trampoline (info1cup20_trampoline) | C++14 | 0 ms | 0 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++>
#define ff first
#define ss second
#define ll long long
using namespace std;
const int MAX=2505;
map<int,vector<int>>m;
int imp(int a,int dif,int c){
while(dif--){
c=lower_bound(v[a].begin(),v[a].end(),c);
a++;
}
return c;
}
void go(){
int n, r,c; cin>>r>>c>>n;
for(int i=0;i<n;i++){
int a,b; cin>>a>>b;
m[a].push_back(b);
}
for(auto it:m){
sort(it.ss.begin(),it.ss.end());
}
int t; cin>>t;
while(t--){
int a,b,e,d; cin>>a>>b>>e>>d;
if(a>e or b>d){
cout<<"No"<<endl;
continue;
}
int dif=e-a;
int nc=imp(a,dif,b);
if(nc<=d) cout<<"Yes"<<endl;
else cout<<"No"<<endl;
}
}
int main(){
fastio;
go();
return 0;
}