Submission #691536

#TimeUsernameProblemLanguageResultExecution timeMemory
691536AiperiiiTrampoline (info1cup20_trampoline)C++14
0 / 100
2075 ms16836 KiB
#include <bits/stdc++.h> using namespace std; int main(){ int r,c,n; cin>>r>>c>>n; map < pair <int,int> ,int> mp; while(n--){ int x,y; cin>>x>>y; pair <int,int> p=make_pair(x,y); mp[p]=1; } int t; cin>>t; while(t--){ int x1,y1,x2,y2; cin>>x1>>y1>>x2>>y2; string ans=""; if(x1>x2 or y1>y2){ ans="No"; } int y=y1; int cnt=0; for(int i=x1;i<x2;i++){ bool c=false; for(auto x : mp){ pair <int,int> p=x.first; if(p.first==i && p.second>=y){ cnt++; y=p.second; c=true; break; } } if(c==false){ ans="No"; break; } } if(ans!="No" && cnt==x2-x1 && y<=y2){ ans="Yes"; } cout<<ans<<endl; } }
#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...