Submission #1020315

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
10203152024-07-11 22:13:38kymRadio Towers (IOI22_towers)C++17
23 / 100
4025 ms5072 KiB
#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);
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...