beechtree.cpp: In function 'void dfs_subtree(int, std::vector<int>&)':
beechtree.cpp:17:22: error: too few arguments to function 'void dfs_subtree(int, std::vector<int>&)'
17 | dfs_subtree(v);
| ^
beechtree.cpp:13:6: note: declared here
13 | void dfs_subtree(int u, vector<int> & subtree)
| ^~~~~~~~~~~
beechtree.cpp: In function 'bool check_permutation(int, std::vector<int>&)':
beechtree.cpp:32:7: error: 'class std::unordered_map<int, int>' has no member named 'resize'; did you mean 'size'?
32 | f.resize(M);
| ^~~~~~
| size
beechtree.cpp:32:14: error: 'M' was not declared in this scope
32 | f.resize(M);
| ^
beechtree.cpp:33:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
33 | for (int i = 1; i < v.size(); i++)
| ~~^~~~~~~~~~
beechtree.cpp:35:26: error: request for member 'count' in 'f.std::unordered_map<int, int>::operator[]((*(const key_type*)(& colors.std::vector<int>::operator[](((std::vector<int>::size_type)i)))))', which is of non-class type 'std::unordered_map<int, int>::mapped_type' {aka 'int'}
35 | if(!f[colors[i]].count()) f[colors[i]] = 0;
| ^~~~~
beechtree.cpp:36:12: error: 'parent' was not declared in this scope; did you mean 'parents'?
36 | if(parent[[v[i]]] != v[f[colors[i]]]) return false;
| ^~~~~~
| parents
beechtree.cpp:36:18: error: two consecutive '[' shall only introduce an attribute before '[' token
36 | if(parent[[v[i]]] != v[f[colors[i]]]) return false;
| ^
beechtree.cpp:36:18: error: expected ')' before '[' token
36 | if(parent[[v[i]]] != v[f[colors[i]]]) return false;
| ~ ^
| )
beechtree.cpp: In function 'std::vector<int> beechtree(int, int, std::vector<int>, std::vector<int>)':
beechtree.cpp:55:9: error: 'subtree' was not declared in this scope; did you mean 'get_subtree'?
55 | subtree = get_subtree(u);
| ^~~~~~~
| get_subtree