/in/foo.cc: In member function 'int segment_tree::query(int, int, int, int, int)':
/in/foo.cc:15:18: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
int ret=0,mid=l+r>>1;
~^~
/in/foo.cc: In member function 'void segment_tree::update(int, int, int, int, int)':
/in/foo.cc:22:12: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
int mid=l+r>>1;
~^~
/in/foo.cc: In function 'int main()':
/in/foo.cc:29:10: error: 't' was not declared in this scope
cin>>n>>t;
^
/in/foo.cc:32:33: error: expected ';' before 'seg2'
if(k==1)seg1.update(1,1,n,1,l)seg2.update(1,1,n,1,r);
^~~~