Submission #1061648

#TimeUsernameProblemLanguageResultExecution timeMemory
1061648j_vdd16Dungeons Game (IOI21_dungeons)C++17
11 / 100
7073 ms33660 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) { while (x != n) { if (z >= s[x]) { z += s[x]; x = w[x]; } else { z += p[x]; x = l[x]; } } return z; }
#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...