제출 #488176

#제출 시각아이디문제언어결과실행 시간메모리
488176yungyao던전 (IOI21_dungeons)C++17
11 / 100
7050 ms28984 KiB
using namespace std; #pragma GCC optimize("Ofast") #include <iostream> #include <algorithm> #include <vector> #include <utility> #include <stack> #include <queue> #include <set> #include <map> typedef long long LL; typedef pair<int,int> pii; #define F first #define S second #define pb push_back #define mkp make_pair #define iter(x) x.begin() x.end() #define REP(n) for (int __=n;__--;) #define REP0(i,n) for (int i=0;i<n;++i) #define REP1(i,n) for (int i=1;i<=n;++i) const int maxn = 5e4+10,mod = 0; const LL inf = 0; int ss[maxn],pp[maxn],ww[maxn],ll[maxn],N; void init(int n,vector <int> s,vector <int> p,vector <int> w,vector <int> l){ N = n; REP0(i,n){ ss[i] = s[i]; pp[i] = p[i]; ww[i] = w[i]; ll[i] = l[i]; } } LL simulate(int x,int is){ LL z = is; while (x != N){ if (z >= ss[x]){ z += ss[x]; x = ww[x]; } else{ z += pp[x]; x = ll[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...