Problem | employee |
---|---|
User | laurenpak |
Submission Time | 2024-02-21 21:01:39 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
employee.cpp:6:5: error: expected primary-expression before ‘if’
6 | if(heights[i]!= -1) return heights[i];
| ^~
employee.cpp:5:19: error: expected ‘]’ before ‘if’
5 | int height(int i)[
| ^
| ]
6 | if(heights[i]!= -1) return heights[i];
| ~~
employee.cpp:7:5: error: expected unqualified-id before ‘if’
7 | if(i == parent[i]) return heights[i] = 1;
| ^~
employee.cpp:8:5: error: expected unqualified-id before ‘else’
8 | else{
| ^~~~
employee.cpp:10:5: error: expected unqualified-id before ‘return’
10 | return heights[i];
| ^~~~~~
employee.cpp:11:1: error: expected unqualified-id before ‘]’ token
11 | ]
| ^