# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
488030 | 2021-11-17T12:49:30 Z | maks007 | Trampoline (info1cup20_trampoline) | C++14 | 2000 ms | 12992 KB |
#include <bits/stdc++.h> using namespace std; void solve() { int r, c; cin >> r >> c; int n; cin >> n; map<int, vector <int>> mp; set <pair<int, int>> s; set <int> xs; for(int i = 0; i < n; i ++) { int a, b; cin >> a >> b; a --; b --; #define pb push_back xs.insert(a); mp[a].pb(b); } int T; cin >> T; while(T --) { pair <int, int> start, end; cin >> start.first >> start.second >> end.first >> end.second; start.first --; start.second --; end.first --; end.second --; if(start.first == end.first) { cout << "Yes\n"; continue; } int temp = start.second; for(int i = start.first; i < end.first; i ++) { if(xs.count(i) == 0) { // cout << i << " "; cout << "No\n"; goto end; } } cout << "Yes\n"; end:; } } int main() { ios::sync_with_stdio(0); cin.tie(0); int Q = 1; //cin >> Q; while (Q --) { solve(); } return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 332 KB | expected NO, found YES [2nd token] |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 176 ms | 2048 KB | expected NO, found YES [1st token] |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 117 ms | 2412 KB | expected NO, found YES [1st token] |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 3 ms | 332 KB | expected NO, found YES [2nd token] |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 2075 ms | 12992 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |