| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1013472 | vjudge1 | DNA 돌연변이 (IOI21_dna) | C++17 | 0 ms | 0 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "dungeons.h"
#include <vector>
#include <bits/stdc++.h>
using namespace std;
int n;
vector<int> s, p, w, l;
void init(int N, std::vector<int> S, std::vector<int> P, std::vector<int> W, std::vector<int> L) {
n = N, s = S, p = P, w = W, l = L;
return;
}
long long simulate(int x, int z) {
long long ans = z;
while(x != n){
if(ans >= s[x]) {
ans += s[x];
x = w[x];
} else {
ans += p[x];
x = l[x];
}
}
return ans;
}
