제출 #1053146

#제출 시각아이디문제언어결과실행 시간메모리
1053146MarwenElarbi던전 (IOI21_dungeons)C++17
11 / 100
7087 ms19784 KiB
#include <bits/stdc++.h> using namespace std; #include "dungeons.h" vector <int> ss,pp,ww,ll; int N; void init(int n, std::vector<int> s, std::vector<int> p, std::vector<int> w, std::vector<int> l) { ss=s; pp=p; ww=w; ll=l; N=n; return; } long long simulate(int x, int z) { long long ans=z; while(x!=N){ if(ans>=ss[x]){ ans+=ss[x]; x=ww[x]; }else{ ans+=pp[x]; x=ll[x]; } } return ans; }
#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...