Submission #1024283

#TimeUsernameProblemLanguageResultExecution timeMemory
1024283HappyCapybaraDungeons Game (IOI21_dungeons)C++17
11 / 100
7091 ms26780 KiB
#include "dungeons.h" #include<bits/stdc++.h> using namespace std; #define ll long long int n; vector<int> s, p, w, l; 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; return; } ll simulate(int x, int z){ ll y = z; while (x != n){ if (y >= s[x]){ y += s[x]; x = w[x]; } else { y += p[x]; x = l[x]; } } return y; }
#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...