| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 996847 | MilosMilutinovic | Island Hopping (JOI24_island) | C++17 | 7 ms | 680 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "island.h"
#include <bits/stdc++.h>
using namespace std;
void solve(int n, int l) {
vector<int> order(1, 1);
for (int i = 1; i < n; i++) {
order.push_back(query(1, i));
}
vector<int> pos(n + 1);
for (int i = 0; i < (int) order.size(); i++) {
pos[order[i]] = i;
}
vector<int> pr(n + 1, -1);
for (int b = 1; b < (int) order.size(); b++) {
int i = order[b];
if (pr[i] != -1) {
continue;
}
int ptr = 1;
while (true) {
int j = query(i, ptr);
ptr += 1;
if (pos[j] > pos[i]) {
pr[j] = i;
} else {
pr[i] = j;
break;
}
}
}
for (int i = 2; i <= n; i++) {
answer(i, pr[i]);
}
}| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
