This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "dungeons.h"
using namespace std;
#include <vector>
int n; std::vector<int> s; std::vector<int> p; std::vector<int> w; std::vector<int> l;
void init(int _n, std::vector<int> _s, std::vector<int> _p, std::vector<int> _w, std::vector<int> _l) {
n=_n;s=_s;p=_p;w=_w;l=_l;
return;
}
long long simulate(int x, int z) {
while (x!=n){
if (z>=s[x]){
z+=s[x];
x=w[x];
}else{
z+=p[x];
x=l[x];
}
}
return z;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |