Submission #1062659

#TimeUsernameProblemLanguageResultExecution timeMemory
1062659aufanDungeons Game (IOI21_dungeons)C++17
11 / 100
7063 ms26708 KiB
#include "dungeons.h" #include <bits/stdc++.h> using namespace std; int n; vector<int> s, p, w, l; 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) { long long f = z; while (x != n) { if (f >= s[x]) { f += s[x]; x = w[x]; } else { f += p[x]; x = l[x]; } } return f; }
#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...