它没法递归吗?
auto dfs = [&](int x, int y) -> int {
if (f[x][y]) return f[x][y];
f[x][y] = 1;
for (int i = 1; i <= 4; ++ i)
{
int tx = x + dx[i];
int ty = y + dy[i];
if (tx >= 1 && tx <= n && ty >= 1 && ty <= m && mp[tx][ty] < mp[x][y])
f[x][y] = max(f[x][y], dfs(tx, ty) + 1);
}
return f[x][y];
};
他要报错
27 37 C:\Users\Lenovo\Documents\a.cpp [Error] use of 'dfs' before deduction of 'auto'
27 37 C:\Users\Lenovo\Documents\a.cpp [Error] use of 'main()::<lambda(int, int)>::<dfs capture>' before deduction of 'auto'
27 47 C:\Users\Lenovo\Documents\a.cpp [Error] 'dfs' cannot be used as a function