Problem ancestor
User Henries
Submission Time 2024-12-19 16:50:07
Score 0
Max Time N/A
Max Memory N/A

Compile Error

ancestor.cpp: In function ‘void dfs(int, int)’:
ancestor.cpp:15:3: error: ‘h’ was not declared in this scope
15 | h[it] = h[x] + 1;
| ^
ancestor.cpp: In function ‘int main()’:
ancestor.cpp:42:11: error: ‘h’ was not declared in this scope
42 | if (k > h[x]){
| ^