# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
892942 | Hhw48 | Trampoline (info1cup20_trampoline) | C++14 | 26 ms | 10076 KiB |
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>
using namespace std;
#define int long long
typedef pair<int,int> pii;
#define fi first
#define se second
int32_t main(){
ios::sync_with_stdio(0);
cin.tie(0);
int r,c,n;
cin>>r>>c>>n;
vector<int>s[n];
for(int i=0; i<n; i++){
int y,x;
cin>>y>>x;
s[y].push_back(x);
}
int t;
cin>>t;
while(t--){
int sy,sx,ey,ex;
cin>>sy>>sx>>ey>>ex;
if(s[sy].empty()){
cout<<"No\n";
continue;
}
bool flag=0;
for(int i=0; i<s[sy].size(); i++){
if(s[sy][i]<=ex){
cout<<"Yes\n";
flag=1;
break;
}
}
if(flag==0)cout<<"No\n";
}
}
Compilation message (stderr)
# | 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... |