wall.cpp:6:7: error: 'MAXN' was not declared in this scope
int m[MAXN][2];
^~~~
wall.cpp:6:7: note: suggested alternative: 'NAN'
int m[MAXN][2];
^~~~
NAN
wall.cpp:7:7: error: 'MAXN' was not declared in this scope
int t[MAXN][2];
^~~~
wall.cpp:7:7: note: suggested alternative: 'NAN'
int t[MAXN][2];
^~~~
NAN
wall.cpp: In function 'void buildWall(int, int, int*, int*, int*, int*, int*)':
wall.cpp:10:25: error: 'm' was not declared in this scope
for(int i=0;i<n;i++)m[i][1]=INT_MAX;
^
wall.cpp:14:18: error: 'm' was not declared in this scope
if(m[j][0]<=height[i]){
^
wall.cpp:16:19: error: 't' was not declared in this scope
t[j][0]=i;
^
wall.cpp:22:18: error: 'm' was not declared in this scope
if(m[j][1]>=height[i]){
^
wall.cpp:24:19: error: 't' was not declared in this scope
t[j][1]=i;
^
wall.cpp:31:10: error: 'm' was not declared in this scope
if(m[i][0]>=m[i][1]&&t[i][0]>t[i][1])fh[i]=m[i][0];
^
wall.cpp:31:28: error: 't' was not declared in this scope
if(m[i][0]>=m[i][1]&&t[i][0]>t[i][1])fh[i]=m[i][0];
^
wall.cpp:32:10: error: 'm' was not declared in this scope
if(m[i][0]>=m[i][1]&&t[i][0]<t[i][1])fh[i]=m[i][1];
^
wall.cpp:32:28: error: 't' was not declared in this scope
if(m[i][0]>=m[i][1]&&t[i][0]<t[i][1])fh[i]=m[i][1];
^
wall.cpp:33:10: error: 'm' was not declared in this scope
if(m[i][0]<=m[i][1])fh[i]=m[i][0];
^