factories.cpp: In constructor 'CentroidTree::CentroidTree(graph<int>&, int)':
factories.cpp:24:16: warning: 'CentroidTree::g' will be initialized after [-Wreorder]
24 | graph<int> g;
| ^
factories.cpp:22:9: warning: 'int CentroidTree::n' [-Wreorder]
22 | int n, root;
| ^
factories.cpp:106:5: warning: when initialized here [-Wreorder]
106 | CentroidTree(const graph<int>& g, int root = 1) : g(g), n((int)g.size()), root(root) {
| ^~~~~~~~~~~~
factories.cpp: In function 'void Init(int, int*, int*, int*)':
factories.cpp:157:28: error: no matching function for call to 'CentroidTree::CentroidTree(graph<long long int>&)'
157 | solver = CentroidTree(g);
| ^
factories.cpp:106:5: note: candidate: 'CentroidTree::CentroidTree(graph<int>&, int)'
106 | CentroidTree(const graph<int>& g, int root = 1) : g(g), n((int)g.size()), root(root) {
| ^~~~~~~~~~~~
factories.cpp:106:36: note: no known conversion for argument 1 from 'graph<long long int>' {aka 'std::vector<std::vector<std::pair<int, long long int>, std::allocator<std::pair<int, long long int> > >, std::allocator<std::vector<std::pair<int, long long int>, std::allocator<std::pair<int, long long int> > > > >'} to 'graph<int>&' {aka 'const std::vector<std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > >, std::allocator<std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > > >&'}
106 | CentroidTree(const graph<int>& g, int root = 1) : g(g), n((int)g.size()), root(root) {
| ~~~~~~~~~~~~~~~~~~^
factories.cpp:103:5: note: candidate: 'CentroidTree::CentroidTree()'
103 | CentroidTree() = default;
| ^~~~~~~~~~~~
factories.cpp:103:5: note: candidate expects 0 arguments, 1 provided
factories.cpp:21:7: note: candidate: 'CentroidTree::CentroidTree(const CentroidTree&)'
21 | class CentroidTree {
| ^~~~~~~~~~~~
factories.cpp:21:7: note: no known conversion for argument 1 from 'graph<long long int>' {aka 'std::vector<std::vector<std::pair<int, long long int>, std::allocator<std::pair<int, long long int> > >, std::allocator<std::vector<std::pair<int, long long int>, std::allocator<std::pair<int, long long int> > > > >'} to 'const CentroidTree&'
factories.cpp:21:7: note: candidate: 'CentroidTree::CentroidTree(CentroidTree&&)'
factories.cpp:21:7: note: no known conversion for argument 1 from 'graph<long long int>' {aka 'std::vector<std::vector<std::pair<int, long long int>, std::allocator<std::pair<int, long long int> > >, std::allocator<std::vector<std::pair<int, long long int>, std::allocator<std::pair<int, long long int> > > > >'} to 'CentroidTree&&'