# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1170581 | lopkus | Trampoline (info1cup20_trampoline) | C++20 | 2096 ms | 2708 KiB |
#include <bits/stdc++.h>
int main() {
std::ios::sync_with_stdio(false);
std::cin.tie(nullptr);
int r, c, n;
std::cin >> r >> c >> n;
std::vector<std::pair<int,int>> a(n + 1);
for(int i = 1; i <= n; i++) {
std::cin >> a[i].first >> a[i].second;
}
std::sort(a.begin() + 1, a.end());
int q;
std::cin >> q;
while(q--) {
int x1, y1, x2, y2;
std::cin >> x1 >> y1 >> x2 >> y2;
if(y1 > y2 || x2 < x1) {
std::cout << "No\n";
continue;
}
int ok = 1;
int currx = x1, curry = y1;
while(true) {
if(currx == x2) {
break;
}
int l = 1, r = n, p = - 1;
while(l <= r) {
int mid = (l + r) / 2;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |