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"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
struct item{
ll strength=0;
ll loss=0;
ll wingo=0;
ll lossgo=0;
};
int finish;
vector<item> arr;
void init(int n, vector<int> s, vector<int> p, vector<int> w, vector<int> l) {
arr.resize(n);
finish=n;
for(int i=0; i < n;i++){
arr[i]={s[i],p[i],w[i],l[i]};
}
return;
}
long long simulate(int x, int z) {
while(x!=finish){
if(z>=arr[x].strength){
z+=arr[x].strength;
x=arr[x].wingo;
} else{
z+=arr[x].loss;
x=arr[x].loss;
}
}
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... |