# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
623925 | sofapuden | Dungeons Game (IOI21_dungeons) | C++17 | 1028 ms | 238772 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.
#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math,O3")
#include "dungeons.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int mxn = 4e5+1;
const int m = 25;
const int c = 8;
ll b[mxn][m][c], t[mxn][m][c], a[mxn][m][c], suf[mxn];
vector<int> s, p, w, l;
int n;
const ll inf = (1ll<<60);
void init(int _n, vector<int> _s, vector<int> _p, vector<int> _w, vector<int> _l) {
n = _n, s = _s, p = _p, w = _w, l = _l;
suf[n] = 0;
for(int i = n-1; ~i; --i){
suf[i] = s[i] + suf[w[i]];
}
for(int i = 0; i < c; ++i){
b[n][0][i] = n;
t[n][0][i] = inf;
a[n][0][i] = 0;
for(int k = 0; k < n; ++k){
if(s[k] <= (1<<(i*3))){
t[k][0][i] = 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... |