# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
372322 | gustason | Airplanes (LMIO17_lektuvai) | C++11 | 93 ms | 8648 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;
struct SegTree {
int n;
vector<int> tree;
SegTree(vector<int>& a) {
n = a.size();
tree.assign(2*n, 0);
for(int i = n; i < 2*n; i++) {
tree[i] = a[i-n];
}
for(int idx = n-1; idx > 1; idx--) {
tree[idx] = max(tree[2*idx], tree[2*idx+1]);
}
}
void update(int idx, int val) {
idx += n;
tree[idx] = val;
while(idx > 1) {
idx /= 2;
tree[idx] = max(tree[2*idx], tree[2*idx+1]);
}
}
int getmax(int l, int r) {
l += n, r += n;
int mx = 0;
while(l < r) {
if (l % 2) {
# | 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... |