Submission #680765

#TimeUsernameProblemLanguageResultExecution timeMemory
680765BlagojDungeons Game (IOI21_dungeons)C++17
11 / 100
7026 ms26656 KiB
#include "dungeons.h" #include <bits/stdc++.h> using namespace std; vector<int> str, ls, wn, lsd; int N; void init(int n, std::vector<int> s, std::vector<int> p, std::vector<int> w, std::vector<int> l) { N = n, str = s, ls = p, wn = w, lsd = l; return; } long long simulate(int x, int z) { while (x != N) { if (z >= str[x]) { z += str[x]; x = wn[x]; } else { z += ls[x]; x = lsd[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...