# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
341575 | nandonathaniel | Money (IZhO17_money) | C++14 | 1553 ms | 50668 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
using namespace std;
const int MAXN=1e6+5;
int a[MAXN],mini,maxi,kel[MAXN],terakhir[MAXN],tree[2][4*MAXN],lazy[4*MAXN];
set<int> S;
bool valid(){
if(mini==maxi)return true;
auto it=S.upper_bound(mini);
auto it2=S.lower_bound(maxi);
return it==it2;
}
void build(int now,int L,int R){
if(L==R){
tree[0][now]=tree[1][now]=1e9;
return;
}
int mid=(L+R)/2;
build(2*now,L,mid);
build(2*now+1,mid+1,R);
tree[0][now]=min(tree[0][2*now],tree[0][2*now+1]);
tree[1][now]=max(tree[1][2*now],tree[1][2*now+1]);
}
void updatetambah(int now,int val){
tree[0][now]+=val;
tree[1][now]+=val;
lazy[now]+=val;
# | 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... |