Submission #794074

#TimeUsernameProblemLanguageResultExecution timeMemory
794074JohannDungeons Game (IOI21_dungeons)C++17
11 / 100
7079 ms19760 KiB
#include "dungeons.h" #include "bits/stdc++.h" using namespace std; typedef vector<int> vi; #define sz(x) (int)(x).size() int N; vi S, P, W, L; void init(int n, std::vector<int> s, std::vector<int> p, std::vector<int> w, std::vector<int> l) { N = n; S = s; P = p; W = w; L = l; return; } long long simulate(int x, int z) { while (x != N) { if (z >= S[x]) z += S[x], x = W[x]; else z += P[x], x = L[x]; } 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...