# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
560099 | nghiass001 | Dungeons Game (IOI21_dungeons) | C++17 | 7038 ms | 378960 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 <bits/stdc++.h>
#define FOR(i,l,r) for(int i=(l); i<=(r); ++i)
#define REP(i,l,r) for(int i=(l); i<(r); ++i)
#define FORD(i,r,l) for(int i=(r); i>=(l); --i)
#define REPD(i,r,l) for(int i=(r)-1; i>=(l); --i)
using namespace std;
const int N = 4e5 + 5, logN = 19;
int nn, lose[N], next_win[N], next_los[N];
long long strong[N];
long long pwin[N][logN], pwinmax[N][logN], sumwin[N][logN];
long long plos[N][logN], plosmin[N][logN], sumlos[N][logN];
set<long long> ST;
void init(int n, vector<int> s, vector<int> p, vector<int> w, vector<int> l) {
nn = n;
REP(i, 0, nn) {
strong[i] = s[i];
lose[i] = p[i];
next_win[i] = w[i];
next_los[i] = l[i];
}
next_win[nn] = nn;
next_los[nn] = nn;
strong[nn] = 1e13;
FOR(i, 0, nn) {
pwin[i][0] = next_win[i];
plos[i][0] = next_los[i];
pwinmax[i][0] = strong[i];
plosmin[i][0] = strong[i];
# | 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... |