# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
446590 | SuffixAutomata | Dungeons Game (IOI21_dungeons) | C++17 | 4086 ms | 1046196 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>
using namespace std;
using ll = long long;
int lose[400005], win[500005];
int he[400005], loseget[400005];
int n;
bool sub2 = 1;
bool sub4 = 1;
struct s2tag {
int en;
ll enExp;
int gap;
} s2fw[9][12][400005];
// s2fw[i][j][k] = from k, beat all <4^i, go 4^j steps
// gap: least amount of health you need to begin with for s2fw[i][j][k] to not
// work
ll p5[30];
s2tag mer(s2tag a, s2tag b) {
ll h = b.gap - a.enExp;
if (b.gap == 1ll << 29)
h = 1 << 29;
return {b.en, a.enExp + b.enExp, max(0ll, min(1ll * a.gap, h))};
}
#define ex4(n) p5[n]
Compilation message (stderr)
# | 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... |