제출 #129986

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
1299862019-07-13 17:40:36VardanyanHacker (BOI15_hac)C++14
100 / 100
272 ms28536 KiB
#include <bits/stdc++.h>
using namespace std;
const int N = 500*1000+5;
int a[N];
long long pref[N];
long long ANS[N];
long long prefmx[N];
long long sufmx[N];
long long t[4*N];
void update(int v,int s,int e,int l,int r,long long val){
if(l>r) return;
if(s == l && e == r){
t[v] = val;
return;
}
int m = (s+e)/2;
update(v*2,s,m,l,min(m,r),val);
update(v*2+1,m+1,e,max(l,m+1),r,val);
t[v] = max(t[v*2],t[v*2+1]);
}
long long get(int v,int s,int e,int l,int r){
if(l>r) return 0;
if(s == l && e == r) return t[v];
int m = (s+e)/2;
return max(get(v*2,s,m,l,min(m,r)),
get(v*2+1,m+1,e,max(l,m+1),r));
}
int main(){
ios_base::sync_with_stdio(false);
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

컴파일 시 표준 에러 (stderr) 메시지

hac.cpp: In function 'int main()':
hac.cpp:40:17: warning: unused variable 'jj' [-Wunused-variable]
             int jj = j;
                 ^~
hac.cpp:41:17: warning: unused variable 'qn' [-Wunused-variable]
             int qn = 0;
                 ^~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...