# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
896228 | Muhammad_Aneeq | Dungeons Game (IOI21_dungeons) | C++17 | 7097 ms | 26928 KiB |
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 <vector>
#include "dungeons.h"
using namespace std;
int const N=4e5+10;
int wi[N],lo[N],po[N],st[N];
int nn;
void init(int n, vector<int> s, vector<int> p, vector<int> w, vector<int> l)
{
nn=n;
for (int i=0;i<n;i++)
{
wi[i]=w[i];
lo[i]=l[i];
st[i]=s[i];
po[i]=p[i];
}
}
long long simulate(int i, int z)
{
long long ans=z;
bool w=0;
while (i!=nn)
{
if (z>=st[i])
{
z+=st[i];
i=wi[i];
}
else
{
z+=po[i];
i=lo[i];
}
}
return z;
}
Compilation message (stderr)
# | 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... |