Submission #609200

#TimeUsernameProblemLanguageResultExecution timeMemory
609200lorenzoferrariDungeons Game (IOI21_dungeons)C++17
11 / 100
7078 ms22056 KiB
#include "dungeons.h" #include <bits/stdc++.h> using namespace std; using vi = vector<int>; using LL = long long; int n; vi s, p, w, l; void init(int n, vi s, vi p, vi w, vi l) { ::n = n, ::s = s, ::p = p, ::w = w, ::l = l; } LL simulate(int x, int z) { int i = x; while (i != n) { if (z >= s[i]) { z += s[i]; i = w[i]; } else { z += p[i]; i = l[i]; } } return z; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...