#include <bits/stdc++.h>
using namespace std;
#define int long long
#define mod 1000000007
int32_t main(){
ios::sync_with_stdio(0);
cin.tie(0);
int r,c,n;
cin>>r>>c>>n;
int arr[r+1][c+1];
memset(arr,0,sizeof(arr));
for(int i=1; i<=n; i++){
int x,y;
cin>>y>>x;
arr[y][x]=1;
}
int t;
cin>>t;
while(t--){
int sy,sx,ey,ex;
cin>>sy>>sx>>ey>>ex;
bool flag=true;
if(sy==r){
cout<<"No\n";
continue;
}
for(int i=sx; i<=c; i++){
if(arr[sy][i]==1 && i<=ex){
cout<<"Yes\n";
flag=false;
break;
}
}
if(flag==true)cout<<"No\n";
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
600 KB |
expected NO, found YES [2nd token] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
81 ms |
49388 KB |
expected NO, found YES [1st token] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
559 ms |
1048576 KB |
Execution killed with signal 9 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
496 ms |
1048576 KB |
Execution killed with signal 9 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
508 ms |
1048576 KB |
Execution killed with signal 9 |
2 |
Halted |
0 ms |
0 KB |
- |