# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
964658 | kilkuwu | Rainforest Jumps (APIO21_jumps) | C++17 | 968 ms | 142968 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 "jumps.h"
#include <bits/stdc++.h>
template<typename T, typename F>
struct SparseTable {
std::vector<std::vector<T>> t;
SparseTable() {}
SparseTable(const std::vector<T>& a) : t(std::__lg(a.size()) + 1, std::vector<T>(a)) {
for (int k = 0; k + 1 < (int) t.size(); k++)
for (int i = 0; i + (1 << k) < (int) a.size(); i++)
t[k + 1][i] = F()(t[k][i], t[k][i + (1 << k)]);
}
T query(int l, int r) {
int k = std::__lg(r - l + 1);
return F()(t[k][l], t[k][r - (1 << k) + 1]);
}
};
template<typename T>
struct MaxMerge {
T operator()(const T& a, const T& b) {
return std::max<T>(a, b);
}
};
template<typename T>
struct MinMerge {
T operator()(const T& a, const T& b) {
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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |