beechtree.cpp: In function 'void dfs_subtree(int, std::vector<int>&)':
beechtree.cpp:16:11: error: found ':' in nested-name-specifier, expected '::'
16 | for(v : children[u]){
| ^
| ::
beechtree.cpp:16:9: error: 'v' has not been declared
16 | for(v : children[u]){
| ^
beechtree.cpp:19:1: error: expected primary-expression before '}' token
19 | }
| ^
beechtree.cpp:18:6: error: expected ';' before '}' token
18 | }
| ^
| ;
19 | }
| ~
beechtree.cpp:19:1: error: expected primary-expression before '}' token
19 | }
| ^
beechtree.cpp:18:6: error: expected ')' before '}' token
18 | }
| ^
| )
19 | }
| ~
beechtree.cpp:16:8: note: to match this '('
16 | for(v : children[u]){
| ^
beechtree.cpp:19:1: error: expected primary-expression before '}' token
19 | }
| ^
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