closing.cpp: In function 'void dfs(int, int, const Graph&, std::vector<long long int>&)':
closing.cpp:12:19: error: 'd' was not declared in this scope
12 | dfs(v, u, d);
| ^
closing.cpp: In function 'int sub1(int, long long int)':
closing.cpp:20:21: error: 'd' was not declared in this scope
20 | a.push_back(d[0][i]);
| ^
closing.cpp: In function 'int max_score(int, int, int, long long int, std::vector<int>, std::vector<int>, std::vector<int>)':
closing.cpp:48:18: error: invalid initialization of reference of type 'std::vector<long long int>&' from expression of type 'std::vector<int>'
48 | dfs(X, X, g, dX);
| ^~
closing.cpp:7:61: note: in passing argument 4 of 'void dfs(int, int, const Graph&, std::vector<long long int>&)'
7 | void dfs(int u, int par, const Graph& g, vector<long long>& dist) {
| ~~~~~~~~~~~~~~~~~~~^~~~
closing.cpp:49:18: error: invalid initialization of reference of type 'std::vector<long long int>&' from expression of type 'std::vector<int>'
49 | dfs(Y, Y, g, dY);
| ^~
closing.cpp:7:61: note: in passing argument 4 of 'void dfs(int, int, const Graph&, std::vector<long long int>&)'
7 | void dfs(int u, int par, const Graph& g, vector<long long>& dist) {
| ~~~~~~~~~~~~~~~~~~~^~~~
closing.cpp:40:14: warning: control reaches end of non-void function [-Wreturn-type]
40 | Graph g(N);
| ^