Submission #623931

#TimeUsernameProblemLanguageResultExecution timeMemory
623931HanksburgerDungeons Game (IOI21_dungeons)C++17
11 / 100
7056 ms19756 KiB
#include "dungeons.h" #include <bits/stdc++.h> using namespace std; vector<int> S, P, W, L; int N; void init(int n, vector<int> s, vector<int> p, vector<int> w, vector<int> l) { N=n; S=s; P=p; W=w; L=l; } long long simulate(int x, int Z) { long long z=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...