foo.cc: In function 'void DFS(std::vector<std::vector<int> >, int, int, int, int, int, int, int&, int)':
foo.cc:34:54: error: 'maxans' was not declared in this scope
DFS(Map,nextx,nexty,res+Map[nextx][nexty],ans,n,m,maxans,1);
^~~~~~
foo.cc:34:54: note: suggested alternative: 'ans'
DFS(Map,nextx,nexty,res+Map[nextx][nexty],ans,n,m,maxans,1);
^~~~~~
ans
foo.cc:40:12: error: 'nextx' was not declared in this scope
DFS(Map,nextx,nexty,res,ans+Map[x][ry],n,m,maxans,0);
^~~~~
foo.cc:40:18: error: 'nexty' was not declared in this scope
DFS(Map,nextx,nexty,res,ans+Map[x][ry],n,m,maxans,0);
^~~~~
foo.cc:40:47: error: 'maxans' was not declared in this scope
DFS(Map,nextx,nexty,res,ans+Map[x][ry],n,m,maxans,0);
^~~~~~
foo.cc:40:47: note: suggested alternative: 'ans'
DFS(Map,nextx,nexty,res,ans+Map[x][ry],n,m,maxans,0);
^~~~~~
ans
foo.cc:42:18: error: 'dy' was not declared in this scope
else if(dx<n&&(dy>=m||Map[dx][y]>Map[x][ry]){
^~
foo.cc:42:18: note: suggested alternative: 'dx'
else if(dx<n&&(dy>=m||Map[dx][y]>Map[x][ry]){
^~
dx
foo.cc:42:47: error: expected ')' before '{' token
else if(dx<n&&(dy>=m||Map[dx][y]>Map[x][ry]){
^
foo.cc:45:2: error: expected primary-expression before '}' token
}
^
[Hydro](https://hydro.ac)提供评测服务