제출 #437340

#제출 시각아이디문제언어결과실행 시간메모리
437340Mohammed_Atalah던전 (IOI21_dungeons)C++17
11 / 100
7065 ms20592 KiB
#include "dungeons.h" #include <vector> #include <bits/stdc++.h> using namespace std; long long N; vector<int> wp; vector<int> lp; vector<int> W; vector<int> L; void init(int n, std::vector<int> s, std::vector<int> p, std::vector<int> w, std::vector<int> l) { N = n; wp = s; lp = p; W = w; L = l; return; } long long res; void solve(long long num1, long long num2){ if(num1 == N){ res = num2; return; } if(num2 >= wp[num1]){ num2+=wp[num1]; solve(W[num1], num2); }else{ num2+=lp[num1]; solve(L[num1], num2); } } long long simulate(int x, int z) { solve(x,z); return res; }
#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...