# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
748966 | model_code | 서열 (APIO23_sequence) | C++17 | 942 ms | 53732 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "sequence.h"
#include<bits/stdc++.h>
#define re register
using namespace std;
int n,m,a[500002],ans,mx[2000002],mn[2000002],sum,tg[2000002],Mx,Mn,pmx[2000002],pmn[2000002],smx[2000002],smn[2000002],Q[500002],hd,tl;
vector<int>AA[500002];
inline void Add(re int p,re int x){
mx[p]+=x,mn[p]+=x,tg[p]+=x;
}
inline void pd(re int p){
if(tg[p])Add(p<<1,tg[p]),Add(p<<1|1,tg[p]),tg[p]=0;
}
inline void pu(re int p){
mx[p]=max(mx[p<<1],mx[p<<1|1]);
mn[p]=min(mn[p<<1],mn[p<<1|1]);
}
inline void add(re int p,re int l,re int r,re int x,re int y,re int z){
if(l>=x&&r<=y)return Add(p,z);
pd(p);
re int mid=l+r>>1;
if(x<=mid)add(p<<1,l,mid,x,y,z);
if(y>mid)add(p<<1|1,mid+1,r,x,y,z);
pu(p);
}
inline void ask(re int p,re int l,re int r,re int x,re int y){
if(l>=x&&r<=y){
Mx=max(Mx,mx[p]),Mn=min(Mn,mn[p]);
return;
}
pd(p);
컴파일 시 표준 에러 (stderr) 메시지
# | 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... |