# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1169716 | thelegendary08 | Radio Towers (IOI22_towers) | C++17 | 4085 ms | 2162688 KiB |
#include "towers.h"
#include<bits/stdc++.h>
#define vi vector<int>
#define pb push_back
#define f0r(i,n) for(int i = 0; i<n; i++)
#define FOR(i, k, n) for(int i = k; i<n; i++)
using namespace std;
int mxd = -1;
int mx = 0;
vi v;
const int mxn = 1e5 + 5;
vi tree(mxn * 4);
int n;
void update(int k, int x){
k += n;
tree[k] = x;
for(k /=2; k>=1; k/=2){
tree[k] = max(tree[k*2], tree[k*2+1]);
}
}
int quer(int l, int r){
if(l >r)return 0;
l += n; r += n;
int ret = 0;
while(l <= r){
if(l % 2 == 1)ret = max(ret, tree[l++]);
if(r % 2 == 0)ret = max(ret, tree[r--]);
r /=2; 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |