제출 #1123145

#제출 시각아이디문제언어결과실행 시간메모리
1123145PwoTrampoline (info1cup20_trampoline)C++17
43 / 100
852 ms1114112 KiB
#include <bits/stdc++.h> using namespace std; #define int long long int32_t main() { ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int r, c, n; cin >> r >> c >> n; set<int> st[r + 1]; for (int i = 0; i < n; i++) { int x, y; cin >> x >> y; st[x].insert(y); } int t; cin >> t; while (t--) { int x1, y1, x2, y2; cin >> x1 >> y1 >> x2 >> y2; if (x2 < x1 || y2 < y1) { cout << "No\n"; continue; } int cur = y1; bool b = 1; for (int i = x1; i < x2; i++) { auto it = st[i].lower_bound(cur); if (it == st[i].end()) { b = 0; break; } cur = *it; if (cur > y2) { b = 0; break; } } cout << (b ? "Yes\n" : "No\n"); } }
#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...