# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1046212 | VMaksimoski008 | Dungeons Game (IOI21_dungeons) | C++17 | 7094 ms | 19784 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;
using ll = long long;
const int maxn = 4e5 + 5;
vector<int> S, P, W, L;
int N;
void init(int n, vector<int> s, vector<int> p, vector<int> w, vector<int> l) {
N = n;
S = s;
P = p;
W = w;
L = l;
return;
}
long long simulate(int x, int z) {
ll ans = z;
while(x != N) {
if(z >= S[x]) {
z += S[x];
x = W[x];
} else {
z += P[x];
x = L[x];
}
}
return z;
}
Compilation message (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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |