Submission #480967

#TimeUsernameProblemLanguageResultExecution timeMemory
480967rk42745417Trampoline (info1cup20_trampoline)C++17
11 / 100
2093 ms14404 KiB
#include <bits/stdc++.h> using namespace std; #define EmiliaMyWife ios::sync_with_stdio(0); cin.tie(0); using ll = int64_t; using uint = uint32_t; using ull = uint64_t; using ld = long double; const int INF = 0x3f3f3f3f; const int MOD = 1e9 + 7; const double EPS = 1e-8; const ll LINF = ll(1e18) + ll(1e15); static auto LamyIsCute = []() { EmiliaMyWife return 48763; }(); signed main() { int r, c, n; cin >> r >> c >> n; vector<pair<int, int>> arr(n); for(int i = 0; i < n; i++) cin >> arr[i].first >> arr[i].second; sort(arr.begin(), arr.end()); int q; cin >> q; auto query = [&]() { int x1, y1, x2, y2; cin >> x1 >> y1 >> x2 >> y2; while(x1 < x2) { auto l = lower_bound(arr.begin(), arr.end(), make_pair(x1, y1)); if(l == arr.end() || l->first != x1 || l->second > y2) return false; x1++; y1 = l->second; } return true; }; while(q--) { cout << (query() ? "Yes" : "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...