제출 #523225

#제출 시각아이디문제언어결과실행 시간메모리
523225marat0210던전 (IOI21_dungeons)C++17
11 / 100
7062 ms33104 KiB
#include <dungeons.h> #include <bits/stdc++.h> using namespace std; vector <long long> a, b, win, lose; void init(int n, vector <int> s, vector <int> p, vector <int> w, vector <int> l) { for (int i = 0; i < n; ++i) { a.push_back(s[i]); b.push_back(p[i]); win.push_back(w[i]); lose.push_back(l[i]); } } long long simulate(int x, int z) { long long cur = z, d = x; while (1) { if (d == (long long)a.size()) { break; } if (cur >= a[d]) { cur += a[d]; d = win[d]; } else { cur += b[d]; d = lose[d]; } } return cur; }
#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...