supertrees.cpp: In lambda function:
supertrees.cpp:46:17: error: no match for call to '(std::function<void(int)>) (int&, int&)'
46 | dfs(u, f);
| ^
In file included from /usr/include/c++/9/functional:59,
from /usr/include/c++/9/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/9/algorithm:71,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:65,
from supertrees.cpp:1:
/usr/include/c++/9/bits/std_function.h:683:5: note: candidate: '_Res std::function<_Res(_ArgTypes ...)>::operator()(_ArgTypes ...) const [with _Res = void; _ArgTypes = {int}]'
683 | function<_Res(_ArgTypes...)>::
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/9/bits/std_function.h:683:5: note: candidate expects 1 argument, 2 provided
supertrees.cpp: In function 'int construct(std::vector<std::vector<int> >)':
supertrees.cpp:49:3: error: conversion from 'construct(std::vector<std::vector<int> >)::<lambda(int, int)>' to non-scalar type 'std::function<void(int)>' requested
49 | };
| ^
supertrees.cpp:54:17: error: no match for call to '(std::function<void(int)>) (int&, int&)'
54 | dfs(st, st);
| ^
In file included from /usr/include/c++/9/functional:59,
from /usr/include/c++/9/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/9/algorithm:71,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:65,
from supertrees.cpp:1:
/usr/include/c++/9/bits/std_function.h:683:5: note: candidate: '_Res std::function<_Res(_ArgTypes ...)>::operator()(_ArgTypes ...) const [with _Res = void; _ArgTypes = {int}]'
683 | function<_Res(_ArgTypes...)>::
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/9/bits/std_function.h:683:5: note: candidate expects 1 argument, 2 provided
supertrees.cpp:89:27: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
89 | for (int i = 0; i < arr.size(); i++) ed.push_back({arr[i], arr[(i + 1) % arr.size()]});
| ~~^~~~~~~~~~~~
supertrees.cpp:94:27: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
94 | for (int i = 0; i < arr.size(); i++) {
| ~~^~~~~~~~~~~~
supertrees.cpp:95:33: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
95 | for (int j = 0; j + 1 < have[i].size(); j++) {
| ~~~~~~^~~~~~~~~~~~~~~~
supertrees.cpp:101:31: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
101 | for (int i = 0; i + 1 < comp.size(); i++) ed.push_back({comp[i], comp[i + 1]});
| ~~~~~~^~~~~~~~~~~~~
supertrees.cpp:69:11: warning: unused variable 'sz' [-Wunused-variable]
69 | int sz = comp.size();
| ^~
supertrees.cpp:105:21: error: 'build' was not declared in this scope
105 | for (auto e : ed) build(e.first, e.second);
| ^~~~~