Submission #1176160

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
11761602025-03-30 04:31:37gygDungeons Game (IOI21_dungeons)C++20
13 / 100
714 ms592980 KiB
#pragma GCC optimize("O3", "unroll-loops")
#pragma GCC target("avx2")
#include "dungeons.h"
#include <bits/stdc++.h>
using namespace std;
#define sig signed
#define int long long
#define vec vector
#define arr array
const int N = 4e5 + 5, LG = 27;
int n;
arr<int, N> wn, ls, wn_nd, ls_nd;
arr<arr<vec<int>, N>, LG> wn_jmp, ls_jmp;
void jmp_cmp() {
for (int u = 0; u <= n; u++)
wn_jmp[0][u] = {wn_nd[u], wn[u], wn[u]};
for (int i = 1; i <= 25; i++) {
for (int u = 0; u <= n; u++) {
vec<int> x = wn_jmp[i - 1][u];
vec<int> y = wn_jmp[i - 1][x[0]];
wn_jmp[i][u] = {y[0], x[1] + y[1], max(x[2], y[2] - x[1])};
}
}
for (int u = 0; u <= n; u++)
ls_jmp[0][u] = {ls_nd[u], ls[u], wn[u] - 1};
for (int i = 1; i <= 25; i++) {
for (int u = 0; u <= n; u++) {
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#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...