| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1053171 | Zicrus | 던전 (IOI21_dungeons) | C++17 | 7078 ms | 604 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#include "dungeons.h"
using namespace std;
typedef long long ll;
int n;
vector<int> p, w, l;
int s;
vector<vector<pair<ll, ll>>> jmp;
vector<ll> dp;
void init(int n1, vector<int> s1, vector<int> p1, vector<int> w1, vector<int> l1) {
n = n1; s = s1[0]; p = p1; w = w1; l = l1;
jmp = vector<vector<pair<ll, ll>>>(n, vector<pair<ll, ll>>(20));
for (int i = 0; i < n; i++) {
jmp[i][0] = {p[i], l[i]};
}
for (int j = 1; j < 20; j++) {
for (int i = 0; i < n; i++) {
jmp[i][j] = {jmp[jmp[i][j-1].second][j-1].first + jmp[i][j-1].first,
jmp[jmp[i][j-1].second][j-1].second};
}
}
dp = vector<ll>(n+1);
dp[n] = 0;
for (int i = n-1; i >= 0; i--) {
dp[i] = s + dp[w[i]];
}
}
ll simulate(int x1, int z1) {
ll i = x1, z = z1;
for (int j = 20-1; j >= 0; j++) {
if (z + jmp[i][j].first < s) {
z += jmp[i][j].first;
i += jmp[i][j].second;
}
}
if (z < s) {
z += jmp[i][0].first;
i += jmp[i][0].second;
}
z += dp[i];
return z;
}컴파일 시 표준 에러 (stderr) 메시지
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
