제출 #579836

#제출 시각아이디문제언어결과실행 시간메모리
579836joelau던전 (IOI21_dungeons)C++17
11 / 100
7071 ms26796 KiB
#include "dungeons.h" #include <bits/stdc++.h> using namespace std; int N, S[400005], P[400005], W[400005], L[400005]; void init(int n, vector<int> s, vector<int> p, vector<int> w, vector<int> l) { N = n; for (int i = 0; i < N; ++i) S[i] = s[i], P[i] = p[i], W[i] = w[i], L[i] = l[i]; } 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...