family.cpp: In function 'int main()':
family.cpp:58:21: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
58 | for (int i = 1; i < leaf[x].size(); ++i) sets.union_set(leaf[x][i - 1], leaf[x][i]);
| ~~^~~~~~~~~~~~~~~~
family.cpp:59:33: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
59 | if (sets.get_size(leaf[x][0]) != leaf[x].size()) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
family.cpp:34:7: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
34 | scanf("%d %d %d", &N1, &N2, &K);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
family.cpp:37:8: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
37 | scanf("%d", &p);
| ~~~~~^~~~~~~~~~
family.cpp:42:8: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
42 | scanf("%d", &p);
| ~~~~~^~~~~~~~~~
family.cpp:46:8: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
46 | scanf("%d", &p);
| ~~~~~^~~~~~~~~~
family.cpp:51:5: warning: 'r2' may be used uninitialized in this function [-Wmaybe-uninitialized]
51 | dfs(r2);
| ~~~^~~~
family.cpp:50:5: warning: 'r1' may be used uninitialized in this function [-Wmaybe-uninitialized]
50 | dfs(r1);
| ~~~^~~~