Submission #920915

#TimeUsernameProblemLanguageResultExecution timeMemory
920915zhehanTrampoline (info1cup20_trampoline)C++14
0 / 100
424 ms1048576 KiB
#include <bits/stdc++.h> using namespace std; #define int long long signed main() { int r,c,n,t; cin>>r>>c>>n; vector<int>m(r+1,c+10); 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(x1==x2) 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...