Submission #637342

#TimeUsernameProblemLanguageResultExecution timeMemory
637342kidesoTrampoline (info1cup20_trampoline)C++17
73 / 100
2085 ms28304 KiB
#include <iostream> #include <map> #include <set> //#include <fstream> using namespace std; //ifstream F("be.txt"); //ofstream Fo("ki.txt"); map<int, set<int> > m; int N, R, C, T; int main(){ cin >> R >> C >> N; int x, y; for(int i = 1; i <= N; ++i){ cin >> x >> y; m[x].insert(y); } cin >> T; int x1, y1; while(T--){ bool flag = false; cin >> x >> y >> x1 >> y1; if(x > x1 || y > y1) flag = false; else if(x == x1) flag = true; else { int i = x, t = y; while(m.count(i) && i != x1){ auto it = m[i].lower_bound(t); if(it == m[i].end()) break; t = *it; if(t > y1) break; ++i; } if(i == x1) flag = true; else flag = false; } cout << (flag ? "Yes\n" : "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...