제출 #1088970

#제출 시각아이디문제언어결과실행 시간메모리
1088970StefanSebez던전 (IOI21_dungeons)C++17
11 / 100
7053 ms26708 KiB
#include "dungeons.h" #include <bits/stdc++.h> using namespace std; const int N=4e5+50; int n,s[N],p[N],w[N],l[N]; void init(int n1, std::vector<int> s1, std::vector<int> p1, std::vector<int> w1, std::vector<int> l1) { n=n1; for(int i=0;i<n;i++){s[i]=s1[i],p[i]=p1[i],w[i]=w1[i],l[i]=l1[i];} return; } 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...