#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll mx=5009;
const int mod= 1e9+7 ;
const ll inf=1e12+4;
//***while there is life there is hope
int r,c,n;
int main() {
//ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
ios_base::sync_with_stdio(0) ;
cin.tie(0) ;
cin>>r>>c>>n;
int rr[n];
int cc[n];
//map<int,vector<int>>row;
for(int i=0;i<n;i++){
cin>>rr[i]>>cc[i];
// row[rr[i]].push_back(cc[i]);
}
/* for(ll i=1;i<=r;i++){
// sort(row[i].begin(),row[i].end());
}*/
int t;
cin>>t;
while(t--){
ll x1,y1,x2,y2;
cin>>x1>>y1>>x2>>y2;
int ans=0;
if(x1<=x2&&y1<=y2){
if(x2-x1==1){
for(int i=0;i<n;i++){
if(rr[i]==x1&&cc[i]>=y1&&cc[i]<=y2){
ans=1;
}
}
}else{
}if(ans){cout<<"Yes"<<endl;}else{cout<<"No"<<"\n";}
}
}
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
2 ms |
364 KB |
expected YES, found NO [1st token] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
36 ms |
1920 KB |
expected YES, found NO [3rd token] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Execution timed out |
2088 ms |
1952 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
12 ms |
364 KB |
expected YES, found NO [1st token] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
232 ms |
2432 KB |
expected YES, found NO [1st token] |
2 |
Halted |
0 ms |
0 KB |
- |