# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1019236 | aykhn | Dungeons Game (IOI21_dungeons) | C++17 | 7034 ms | 399000 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "dungeons.h"
#include <bits/stdc++.h>
using namespace std;
#define inf 0x3F3F3F3F
const int MXN = 4e5 + 5;
const int LOG = 24;
int N;
array<long long, 2> dpw[LOG][MXN], dplw[LOG][MXN];
long long dplp[LOG][MXN];
long long dep[MXN];
void init(int n, vector<int> s, vector<int> p, vector<int> w, vector<int> l)
{
N = n;
for (int i = n - 1; i >= 0; i--) dep[i] = dep[w[i]] + s[i];
for (int i = 0; i < n; i++)
{
dpw[0][i] = {w[i], s[i] + dep[i]};
dplp[0][i] = l[i];
dplw[0][i] = {p[i], s[i]};
}
dpw[0][n] = {n, -inf}, dplp[0][n] = n, dplw[0][n] = {0, -inf};
for (int lg = 1; lg < LOG; lg++)
{
for (int i = 0; i <= n; i++)
{
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |