Submission #829993

#TimeUsernameProblemLanguageResultExecution timeMemory
829993Minindu206Dungeons Game (IOI21_dungeons)C++17
11 / 100
7066 ms19904 KiB
// #include "dungeons.h" #include<bits/stdc++.h> #define ll long long using namespace std; int n; vector<int> s, p, w, l; void init(int nn, vector<int> ss, vector<int> pp, vector<int> ww, vector<int> l1) { n = nn; s = ss; p = pp; w = ww; l = l1; } long long simulate(int x, int z) { ll st = z; while(x != n) { if(st >= s[x]) st += s[x], x = w[x]; else st += p[x], x = l[x]; } return st; }
#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...