/in/foo.cc: In function 'bool ST::GetRMQ(int, int, int&, int&)':
/in/foo.cc:64:2: warning: control reaches end of non-void function [-Wreturn-type]
}
^
/in/foo.cc: In function 'int main()':
/in/foo.cc:78:10: warning: 'val' may be used uninitialized in this function [-Wmaybe-uninitialized]
q.push(State(i,l,r,pos,val-sum[i-1]));//val-sum[i-1] 以i为左端点,右端点在l,r中的最大区间和
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/in/foo.cc:29:93: warning: 'pos' may be used uninitialized in this function [-Wmaybe-uninitialized]
State(int _from,int _l,int _r,int _pos,int _val):from(_from),l(_l),r(_r),pos(_pos),val(_val) {};
^
/in/foo.cc:75:18: note: 'pos' was declared here
for(int i=1,l,r,pos,val;i<=n-L+1;i++){
^~~