Submission #1082377

#TimeUsernameProblemLanguageResultExecution timeMemory
1082377SiliconSquaredDungeons Game (IOI21_dungeons)C++17
11 / 100
7078 ms26784 KiB
#include "dungeons.h" using namespace std; #include <vector> int n; std::vector<int> s; std::vector<int> p; std::vector<int> w; std::vector<int> l; void init(int _n, std::vector<int> _s, std::vector<int> _p, std::vector<int> _w, std::vector<int> _l) { n=_n;s=_s;p=_p;w=_w;l=_l; 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...