Submission #920894

#TimeUsernameProblemLanguageResultExecution timeMemory
920894zhehanTrampoline (info1cup20_trampoline)C++14
0 / 100
2055 ms19188 KiB
#include <bits/stdc++.h> using namespace std; #define int long long signed main() { int r,c,n,t; cin>>r>>c>>n; map<int,int> m; for(int i{};i<n;++i){ int a,b; cin>>a>>b; if(m[a]==0){ m[a]=b; }else{} m[a]=min(m[a],b); } cin>>t; for(int i{};i<t;++i){ int x1,x2,y1,y2; cin>>x1>>y1>>x2>>y2; if(y1==y2) cout<<"Yes"<<'\n'; else{ bool pass{true}; for(int j{x1};j<x2;++j){ if(!(m[j]>=y1&&m[j]<=y2)){ pass=false; }else{ y1=m[j]; } } if(pass){ cout<<"Yes"<<'\n'; }else{ cout<<"No"<<'\n'; } } } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...