# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1027809 | vjudge1 | Trampoline (info1cup20_trampoline) | C++17 | 2045 ms | 8432 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.
#pragma GCC optimize("O3,unroll-loops")
#pragma GCC target("avx,avx2,fma")
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define OYY LLONG_MAX
#define mod 998244353
#define faster ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define FOR for(int i=1;i<=n;i++)
#define mid (start+end)/2
#define lim 1000005
#define fi first
#define se second
vector<pair<int,int>> v;
int32_t main(){
faster
int r,c,n;cin>>r>>c>>n;
FOR{
int x,y;cin>>x>>y;
v.push_back({x,y});
}
sort(v.begin(),v.end());
int q;cin>>q;
while(q--){
int x1,y1,x2,y2;cin>>x1>>y1>>x2>>y2;
bool stop=0;
for(int i=0;i<v.size();i++){
//cout<<x1<<" "<<y1<<endl;
if(v[i].fi<x1){
continue;
}
if(v[i].fi==x1 && y1<=v[i].se){
x1++;
y1=v[i].se;
}
if(x1==x2 && y1<=y2){
stop=1;
break;
}
}
if(stop){
cout<<"Yes"<<'\n';
}
else cout<<"No"<<'\n';
}
return 0;
}
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... |