Submission #437841

#TimeUsernameProblemLanguageResultExecution timeMemory
437841WnRSDungeons Game (IOI21_dungeons)C++17
11 / 100
7067 ms19752 KiB
#include "dungeons.h" #include <bits/stdc++.h> using namespace std; int nnn; vector<int>sss,ppp,www,lll; void init(int nn, vector<int> ss, vector<int> pp, vector<int> ww, vector<int> ll) { nnn=nn; sss=ss,ppp=pp,www=ww,lll=ll; } long long simulate(int x, int z) { while(x != nnn) { if(z >= sss[x]) { z+=sss[x]; x=www[x]; } else { z+=ppp[x]; x=lll[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...