제출 #624826

#제출 시각아이디문제언어결과실행 시간메모리
624826SuhaibSawalha1던전 (IOI21_dungeons)C++17
11 / 100
7093 ms26664 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; return; } long long simulate(int x, int z) { long long cur = z; while (x != n) { if (cur >= s[x]) { cur += s[x]; x = w[x]; } else { cur += p[x]; x = l[x]; } } return cur; }
#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...