Submission #442968

#TimeUsernameProblemLanguageResultExecution timeMemory
442968ltf0501Dungeons Game (IOI21_dungeons)C++17
11 / 100
7082 ms19748 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 cnt = 0; while(x < n) { cnt++; if(z >= s[x]) { z += s[x], x = w[x]; } else { z += p[x], x = l[x]; } } 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...