# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
522144 | maks007 | Trampoline (info1cup20_trampoline) | C++14 | 2097 ms | 21656 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
int main(void) {
ios::sync_with_stdio(0);
cin.tie(0);
int n, m;
cin >> n >> m;
map <int,vector <int>> a;
int q;
cin >> q;
vector <pair <int,int>> temp;
while(q --) {
int x, y;
cin >> x >> y;
x --;
y --;
temp.push_back({x, y});
}
sort(temp.begin(), temp.end());
for(int i = 0; i < temp.size(); i ++) {
a[temp[i].first].push_back(temp[i].second);
}
cin >> q;
while(q --) {
int startx, starty, endx, endy;
cin >> startx >> starty >> endx >> endy;
startx --;
starty --;
endx --;
endy --;
while(startx != endx) {
auto it = lower_bound(a[startx].begin(), a[startx].end(), starty);
if(it == a[startx].end()) {
goto end;
}
startx ++;
starty = *it;
}
if(startx == endx and starty <= endy){
cout << "Yes\n";
}else cout << "No\n";
continue;
end:;
cout << "No\n";
}
return false;
}
컴파일 시 표준 에러 (stderr) 메시지
# | 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... |