Main.cpp: In function 'std::pair<std::set<long long int>*, long long int> dfs(int, int)':
Main.cpp:12:1: warning: no return statement in function returning non-void [-Wreturn-type]
12 | }
| ^
Main.cpp: In function 'int main()':
Main.cpp:29:7: error: cannot convert 'std::vector<int>' to 'int'
29 | dfs(root,-1);
| ^~~~
| |
| std::vector<int>
Main.cpp:10:49: note: initializing argument 1 of 'std::pair<std::set<long long int>*, long long int> dfs(int, int)'
10 | pair<set<long long int>*,long long int> dfs(int i, int p){
| ~~~~^
Main.cpp:28:10: warning: unused variable 'i' [-Wunused-variable]
28 | for(int i : root){
| ^
Main.cpp:15:7: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
15 | scanf(" %d",&N);
| ~~~~~^~~~~~~~~~
Main.cpp:18:8: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
18 | scanf(" %d",&h);
| ~~~~~^~~~~~~~~~
Main.cpp:19:8: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
19 | scanf(" %d",&h1);
| ~~~~~^~~~~~~~~~~