Problem fitnesscorner
User justin271828
Submission Time 2024-12-21 23:47:53
Score 0
Max Time N/A
Max Memory N/A

Compile Error

fitnesscorner.cpp: In function ‘int dfs1(int, int, int)’:
fitnesscorner.cpp:15:13: error: ‘dfs’ was not declared in this scope; did you mean ‘dfs1’?
15 | sub[x] += dfs(k, x, l);}
| ^~~
| dfs1
fitnesscorner.cpp: In function ‘int dfs2(int, int, int)’:
fitnesscorner.cpp:22:28: error: ‘dfs’ was not declared in this scope; did you mean ‘dfs2’?
22 | if (sub[k] > n/2) return dfs(k, x, n);}
| ^~~
| dfs2
fitnesscorner.cpp: In function ‘void build(int, int, int)’:
fitnesscorner.cpp:31:10: error: invalid types ‘int[int]’ for array subscript
31 | if (l[k] == -1) build(k, cent, l+1);}}
| ^
fitnesscorner.cpp:31:28: error: ‘cent’ was not declared in this scope; did you mean ‘cen’?
31 | if (l[k] == -1) build(k, cent, l+1);}}
| ^~~~
| cen