# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
852253 | alex_2008 | Dungeons Game (IOI21_dungeons) | C++17 | 0 ms | 0 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
//#include "dungeons.h"
#include <bits/stdc++.h>
#define mindiff first
#define pos second.first
#define strength second.second
using namespace std;
const long long N = 4e5 + 10;
const long long M = 10000001;
const int INF = 1e7;
pair<int, pair<int, int>> dp[N][8][24];
long long NN;
vector <long long> ss, pp, ww, ll;
long long nxt[N];
int lg8[M];
bool ch = true;
void init(int n, vector<int> s, vector<int> p, vector<int> w, vector<int> l) {
lg8[1] = 0;
for (int i = 1; i < 8; i++) {
lg8[i] = 0;
}
for (int i = 8; i < M; i++) {
lg8[i] = lg8[i / 8] + 1;
}
NN = n;
s.push_back(0);
p.push_back(0);
w.push_back(n);
l.push_back(n);
for (int i = 0; i <= n; i++) {
ss.push_back(s[i]);