# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
446850 | prvocislo | Dungeons Game (IOI21_dungeons) | C++17 | 3882 ms | 1566672 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>
typedef long long ll;
using namespace std;
const int maxd1 = 8, maxd2 = 24, maxn = 4e5 + 5, base = 8;
const ll inf = 1e18 + 5ll;
vector<pair<int, int> > g[maxn];
int kam[maxd1][maxd2][maxn], pw[maxd1+1], n;
vector<int> s, p, w, l;
ll sum[maxd1][maxd2][maxn], mini[maxd1][maxd2][maxn], onlywin[maxn];
void dfs(int u, ll w)
{
onlywin[u] = w;
for (pair<int, int> i : g[u]) dfs(i.first, w+i.second);
}
void init(int n, vector<int> s, vector<int> p, vector<int> w, vector<int> l)
{
s.push_back(0), p.push_back(0), w.push_back(n), l.push_back(n);
::n = n, ::s = s, ::p = p, ::w = w, ::l = l;
pw[0] = 1;
for (int i = 1; i <= maxd1; i++) pw[i] = pw[i-1] * base;
for (int i = 0; i < maxd1; i++)
{
for (int j = 0; j <= n; j++)
{
if (s[j] <= pw[i])
{
sum[i][0][j] = s[j], kam[i][0][j] = w[j];
mini[i][0][j] = inf;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |