Submission #504009

#TimeUsernameProblemLanguageResultExecution timeMemory
504009bebecanvasTrampoline (info1cup20_trampoline)C++14
0 / 100
413 ms1048580 KiB
#include <bits/stdc++.h> using namespace std; #define int long long #define endl '\n' signed main(){ ios_base::sync_with_stdio(false); cin.tie(0); int r, c, n; cin >> r >> c >> n; set<int> s[r]; for(int i=0; i<n; i++){ int a, b; cin >> a >> b; a--; b--; s[a].insert(b); } int q; cin >> q; for(int i=0; i<q; i++){ int a, b, c, d; cin >> a >> b >> c >> d; a--; b--; c--; d--; set<int> ::iterator it; it= s[a].lower_bound(b); if(it!=s[a].end()){ int f= *it; if(f<=d){cout << "Yes" << endl;} else{cout << "No" << endl;} }else{cout << "No" << 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...