# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1174304 | PagodePaiva | Dungeons Game (IOI21_dungeons) | C++20 | 1 ms | 584 KiB |
#include<bits/stdc++.h>
#include <vector>
using namespace std;
const int N = 400010;
const int LOGN = 20;
struct Binary_Lifting{
int pai[N][LOGN], val[N][LOGN];
void build(int n){
for(int bit = 1;bit < LOGN;bit++){
for(int i = 0;i <= n;i++){
pai[i][bit] = pai[pai[i][bit-1]][bit-1];
val[i][bit] = val[i][bit-1] + val[pai[i][bit-1]][bit-1];
}
}
}
} bin[6];
set <int> valores_s;
void init(int n, std::vector<int> s, std::vector<int> p, std::vector<int> w, std::vector<int> l) {
for(int i = 0;i < n;i++){
valores_s.insert(s[i]);
}
if(valores_s.size() > 5) exit(0);
for(int i = 0;i < n;i++){
bin[0].pai[i][0] = l[i];
bin[0].val[i][0] = p[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... |