# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
895432 | omeganot | Soccer Stadium (IOI23_soccer) | C++17 | 3079 ms | 950384 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>
using namespace std;
using ll = long long;
const int MOD = 1E9 + 7;
const int INF = 1E9; const ll INFLL = 1E18;
const int MAX = 2001;
const int LOG = 11;
int lg[MAX];
struct SparseTable {
int n;
vector<vector<int>> sparse;
SparseTable(int n) {
this->n = n;
sparse.assign(n, vector<int>(LOG));
}
void build(vector<int>& a) {
for(int i = 0; i < n; i++) {
sparse[i][0] = a[i];
}
for(int i = 1; i < LOG; i++) {
for(int j = 0; j + (1 << i) - 1 < n; j++) {
sparse[j][i] = max(sparse[j][i - 1], sparse[j + (1 << (i - 1))][i - 1]);
}
}
}
int query(int l, int r) {
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... |