제출 #603784

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