# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
372322 | gustason | Airplanes (LMIO17_lektuvai) | C++11 | 93 ms | 8648 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#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... |