catinatree.cpp:5:31: error: array bound is not an integer constant before ']' token
5 | std::vector<int> children[maxN];
| ^
catinatree.cpp: In function 'std::deque<int> dfs(int)':
catinatree.cpp:8:16: error: 'children' was not declared in this scope
8 | for(int v: children[u]) {
| ^~~~~~~~
catinatree.cpp:12:26: warning: comparison of integer expressions of different signedness: 'int' and 'std::deque<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
12 | for(int i = 0; i < add.size(); i++) res[i] = std::max(res[i], std::max(add[i] + (D-i < res.size() ? res[std::max(D-i, i)] : 0), res[i] + (D-i < add.size() ? add[std::max(D-i, i)] : 0)));
| ~~^~~~~~~~~~~~
catinatree.cpp:12:94: warning: comparison of integer expressions of different signedness: 'int' and 'std::deque<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
12 | for(int i = 0; i < add.size(); i++) res[i] = std::max(res[i], std::max(add[i] + (D-i < res.size() ? res[std::max(D-i, i)] : 0), res[i] + (D-i < add.size() ? add[std::max(D-i, i)] : 0)));
| ~~~~^~~~~~~~~~~~
catinatree.cpp:12:151: warning: comparison of integer expressions of different signedness: 'int' and 'std::deque<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
12 | for(int i = 0; i < add.size(); i++) res[i] = std::max(res[i], std::max(add[i] + (D-i < res.size() ? res[std::max(D-i, i)] : 0), res[i] + (D-i < add.size() ? add[std::max(D-i, i)] : 0)));
| ~~~~^~~~~~~~~~~~
catinatree.cpp:13:53: warning: comparison of integer expressions of different signedness: 'int' and 'std::deque<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
13 | for(int i = add.size(); i >= 0; i--) if(i+1 < res.size()) res[i] = std::max(res[i], res[i+1]); }
| ~~~~^~~~~~~~~~~~
catinatree.cpp: In function 'int main()':
catinatree.cpp:17:49: error: 'children' was not declared in this scope
17 | for(int i = 1; i < N; i++) { std::cin >> x; children[x].push_back(i); }
| ^~~~~~~~