# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
42566 | nonocut | 섬 항해 (CEOI13_adriatic) | C++14 | 2080 ms | 262144 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
using namespace std;
const int maxv = 2500;
const int maxn = 2.5e5 + 5;
struct node {
int x,y,id;
};
int n;
node p[maxn];
vector<int> pos[maxv+5];
vector<int> way[maxn];
bool cmp(node a, node b) {
if(a.x!=b.x) return a.x<b.x;
return a.y>b.y;
}
int main() {
scanf("%d",&n);
for(int i=1;i<=n;i++) scanf("%d%d",&p[i].x,&p[i].y), p[i].id = i;
sort(&p[1],&p[n+1],cmp);
for(int i=1;i<=n;i++) {
for(int y=1;y<p[i].y;y++) {
for(auto x : pos[y]) {
way[p[i].id].push_back(x);
way[x].push_back(p[i].id);
}
}
pos[p[i].y].push_back(p[i].id);
}
//for(int x=1;x<=n;x++) {
// for(auto y : way[x]) printf("%d -> %d\n",x,y);
//}
}
컴파일 시 표준 에러 (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... |