Problem | employee |
---|---|
User | JamesPearman |
Submission Time | 2023-02-03 15:07:39 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
employee.cpp: In function ‘void dfs(int, int)’:
employee.cpp:23:17: error: ‘ans’ was not declared in this scope; did you mean ‘abs’?
23 | depth = max(ans, d + 1);//storing depth each step of way
| ^~~
| abs
employee.cpp:24:16: error: ‘adj’ was not declared in this scope
24 | for (int i:adj[x]) dfs(i, d + 1);
| ^~~
employee.cpp: In function ‘int main()’:
employee.cpp:43:7: error: no match for ‘operator<<’ (operand types are ‘std::ostream’ {aka ‘std::basic_ostream<char>’} and ‘void’)
43 | cout<<dfs(0,0);
| ~~~~^~~~~~~~~~
| | |
| | void
| std::ostream {aka std::basic_ostream<char>}
In file included from /usr/include/c++/9/istream:39,
from /usr/include/c++/9/sstream:38,
from /usr/include/c++/9/complex:45,
from /usr/include/c++/9/ccompl