제출 #837877

#제출 시각아이디문제언어결과실행 시간메모리
837877IS_Rushdi던전 (IOI21_dungeons)C++17
11 / 100
7095 ms26532 KiB
#include "dungeons.h" #include <bits/stdc++.h> using namespace std; typedef long long ll; int n; vector<int>s,p,w,l; 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; } ll simulate(int i, int curr) { while(i != n){ if(curr >= s[i]){ curr+=s[i]; i=w[i]; } else{ curr+=p[i]; i=l[i]; } } return curr; }
#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...