Submission #444175

#TimeUsernameProblemLanguageResultExecution timeMemory
444175urd05Dungeons Game (IOI21_dungeons)C++17
11 / 100
7035 ms19764 KiB
#include "dungeons.h" #include <bits/stdc++.h> using namespace std; int s[400000]; int p[400000]; int w[400000]; int l[400000]; int n; void init(int nn, vector<int> ss, vector<int> pp, vector<int> ww, vector<int> ll) { n=nn; for(int i=0;i<n;i++) { s[i]=ss[i]; p[i]=pp[i]; w[i]=ww[i]; l[i]=ll[i]; } 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 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...