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;
typedef vector<ll> vii;
typedef pair<ll,ll> pii;
#define F first
#define S second
#define pb push_back
#define all(v) v.begin(),v.end()
const ll M=4e5+10;
const ll inf=2e18;
vector<pair<pii,int>>inc[M];
ll awin[M];
ll N;
vector<int>lose,hero,win,enemy;
void init(int n,vector<int>s,vector<int>p,vector<int>w,vector<int>l) {
N=n;
hero=s;
enemy=p;
win=w;
lose=l;
}
long long simulate(int x, int z){
while(x<N){
if(z<hero[x])
z+=enemy[x],x=lose[x];
else
z+=hero[x],x=win[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... |