# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1020315 | kym | Radio Towers (IOI22_towers) | C++17 | 4025 ms | 5072 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 "towers.h"
#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100005;
vector<int>A;
int n;
struct node {
int tree[4*MAXN];
void build(int node, int s, int e){
tree[node]=0;
if(s!=e){
int m=(s+e)/2;
build(node<<1,s,m);
build(node<<1|1,m+1,e);
}
}
void update(int node, int s, int e, int x, int nval){
if(s==e){
tree[node]=nval;
return;
}
int m=(s+e)/2;
if(x<=m)update(node<<1,s,m,x,nval);
else update(node<<1|1,m+1,e,x,nval);
tree[node]=max(tree[node<<1],tree[node<<1|1]);
}
int query(int node, int s, int e, int x, int y){
if(s==x&&e==y)return tree[node];
int m=(s+e)/2;
if(y<=m)return query(node<<1,s,m,x,y);
# | 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... |