Submission #1053142

#TimeUsernameProblemLanguageResultExecution timeMemory
1053142ZicrusDungeons Game (IOI21_dungeons)C++17
11 / 100
7092 ms26676 KiB
#include <bits/stdc++.h> #include "dungeons.h" using namespace std; typedef long long ll; int n; vector<int> s, p, w, l; void init(int n1, vector<int> s1, vector<int> p1, vector<int> w1, vector<int> l1) { n = n1; s = s1; p = p1; w = w1; l = l1; } ll simulate(int x1, int z1) { ll i = x1, z = z1; 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...