treearray.cpp: In function 'void dfs(int, int)':
treearray.cpp:16:9: error: 'v' was not declared in this scope
16 | par[0][v] = p;
| ^
treearray.cpp:19:15: error: 'begin' was not declared in this scope
19 | for(auto v : u) if(v != p) dfs(v, u);
| ^
treearray.cpp:19:15: note: suggested alternatives:
In file included from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:95,
from treearray.cpp:1:
/usr/include/c++/10/valarray:1224:5: note: 'std::begin'
1224 | begin(const valarray<_Tp>& __va)
| ^~~~~
In file included from /usr/include/c++/10/filesystem:46,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:129,
from treearray.cpp:1:
/usr/include/c++/10/bits/fs_dir.h:549:3: note: 'std::filesystem::__cxx11::begin'
549 | begin(recursive_directory_iterator __iter) noexcept
| ^~~~~
treearray.cpp:19:15: error: 'end' was not declared in this scope
19 | for(auto v : u) if(v != p) dfs(v, u);
| ^
treearray.cpp:19:15: note: suggested alternatives:
In file included from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:95,
from treearray.cpp:1:
/usr/include/c++/10/valarray:1244:5: note: 'std::end'
1244 | end(const valarray<_Tp>& __va)
| ^~~
In file included from /usr/include/c++/10/filesystem:46,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:129,
from treearray.cpp:1:
/usr/include/c++/10/bits/fs_dir.h:554:3: note: 'std::filesystem::__cxx11::end'
554 | end(recursive_directory_iterator) noexcept
| ^~~
treearray.cpp: In function 'int main()':
treearray.cpp:56:6: error: 'ty' was not declared in this scope; did you mean 'tm'?
56 | if(ty == 1){
| ^~
| tm