제출 #1061578

#제출 시각아이디문제언어결과실행 시간메모리
1061578j_vdd16던전 (IOI21_dungeons)C++17
0 / 100
3 ms348 KiB
#include "dungeons.h" #include <algorithm> #include <bitset> #include <cstdint> #include <cstring> #include <iostream> #include <limits.h> #include <math.h> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <vector> //#define int long long #define ll long long #define loop(X, N) for(int X = 0; X < (N); X++) #define all(V) V.begin(), V.end() #define rall(V) V.rbegin(), V.rend() using namespace std; typedef vector<int> vi; typedef vector<vi> vvi; typedef pair<int, int> ii; typedef vector<ii> vii; typedef vector<vector<ii>> vvii; typedef vector<bool> vb; typedef vector<vector<bool>> vvb; typedef uint64_t u64; typedef int64_t i64; int n; // constexpr int POW = 24; // vector<ll> maxValues[POW]; vector<ll> s, p; vi w, l; void init(int _n, std::vector<int> _s, std::vector<int> _p, std::vector<int> _w, std::vector<int> _l) { n = _n; w = _w; l = _l; for (int x : _s) s.push_back(x); for (int x : _p) p.push_back(x); return; } long long simulate(int x, int z) { int res = 0; while (x != n) { if (z < s[x]) { z += s[x]; x = w[x]; } else { z += p[x]; x = l[x]; } res++; } return res; }
#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...