wall.cpp: In function 'void push(int, int, int)':
wall.cpp:11:18: error: 'ret' was not declared in this scope
if( l == r ) ret[l] = min( hi[now], max( low[now], ret[l] ) );
^~~
wall.cpp:11:18: note: suggested alternative: 'getw'
if( l == r ) ret[l] = min( hi[now], max( low[now], ret[l] ) );
^~~
getw
wall.cpp:11:46: error: 'low' was not declared in this scope
if( l == r ) ret[l] = min( hi[now], max( low[now], ret[l] ) );
^~~
wall.cpp:11:46: note: suggested alternative: 'now'
if( l == r ) ret[l] = min( hi[now], max( low[now], ret[l] ) );
^~~
now
wall.cpp:13:21: error: 'f' was not declared in this scope
hi[now<<1] = max( f, min( hi[now], t ) ), lo[now<<1] = min( t, max( lo[now], f ) );
^
wall.cpp:13:38: error: 't' was not declared in this scope
hi[now<<1] = max( f, min( hi[now], t ) ), lo[now<<1] = min( t, max( lo[now], f ) );
^
wall.cpp: At global scope:
wall.cpp:20:63: error: 'n' was not declared in this scope
void update( int ll, int rr, int f, int t, int l = 1, int r = n, int now = 1 ) {
^
wall.cpp: In function 'void update(int, int, int, int, int, int, int)':
wall.cpp:22:26: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
if( l > rr || r < ll && l > r ) return ;
~~~~~~~^~~~~~~~
wall.cpp: At global scope:
wall.cpp:32:37: error: 'n' was not declared in this scope
void computeans( int l = 1, int r = n, int now = 1 ) {
^
wall.cpp: In function 'void buildWall(int, int, int*, int*, int*, int*, int*)':
wall.cpp:48:27: error: 'n' was not declared in this scope
for( int i = 1 ; i <= n ; i++ ) finalheight[i-1] = ret[i];
^
wall.cpp:48:56: error: 'ret' was not declared in this scope
for( int i = 1 ; i <= n ; i++ ) finalheight[i-1] = ret[i];
^~~
wall.cpp:48:56: note: suggested alternative: 'left'
for( int i = 1 ; i <= n ; i++ ) finalheight[i-1] = ret[i];
^~~
left