Submission #624826

#TimeUsernameProblemLanguageResultExecution timeMemory
624826SuhaibSawalha1Dungeons Game (IOI21_dungeons)C++17
11 / 100
7093 ms26664 KiB
#include "dungeons.h" #include <bits/stdc++.h> using namespace std; 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) { long long cur = z; while (x != n) { if (cur >= s[x]) { cur += s[x]; x = w[x]; } else { cur += p[x]; x = l[x]; } } return cur; }
#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...