Submission #1009459

#TimeUsernameProblemLanguageResultExecution timeMemory
1009459induwara16Dungeons Game (IOI21_dungeons)C++17
11 / 100
7067 ms26784 KiB
#include "dungeons.h" #include <bits/stdc++.h> using namespace std; typedef string str; typedef vector<int> vi; int n; vi s, p, w, l; void init(int n1, std::vector<int> s1, std::vector<int> p1, std::vector<int> w1, std::vector<int> l1) { n = n1; s = s1; p = p1; w = w1; l = l1; } long long simulate(int x, int z) { if (x == n) return z; else if (z >= s[x]) return simulate(w[x], z + s[x]); else return simulate(l[x], z + p[x]); }
#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...