cleaning.cpp: In function 'int getleaf(int)':
cleaning.cpp:24:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
24 | for(int i=0;i<son[v].size();i++) {
| ~^~~~~~~~~~~~~~
cleaning.cpp: In function 'void dfs(int, int)':
cleaning.cpp:49:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
49 | for(int i=0;i<adj[v].size();i++) {
| ~^~~~~~~~~~~~~~
cleaning.cpp: In function 'int main()':
cleaning.cpp:124:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
124 | for(int j=0;j<son[rev[i]].size();j++) {
| ~^~~~~~~~~~~~~~~~~~~
cleaning.cpp:155:34: error: 'cnt' was not declared in this scope; did you mean 'int'?
155 | if (!son[v].empty()||cnt[v]>0) {
| ^~~
| int
cleaning.cpp:160:13: error: 'cnt' was not declared in this scope; did you mean 'int'?
160 | cnt[v]++;
| ^~~
| int
cleaning.cpp:164:26: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
164 | for(int j=0;j<save.size();j++) {
| ~^~~~~~~~~~~~
cleaning.cpp:177:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
177 | for(int j=0;j<save.size();j++) {
| ~^~~~~~~~~~~~
cleaning.cpp:89:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
89 | scanf("%d %d",&n,&q);
| ~~~~~^~~~~~~~~~~~~~~
cleaning.cpp:93:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
93 | scanf("%d %d",&u,&v);
| ~~~~~^~~~~~~~~~~~~~~
cleaning.cpp:133:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
133 | scanf("%d",&k);
| ~~~~~^~~~~~~~~
cleaning.cpp:135:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
135 | scanf("%d",&x);
| ~~~~~^~~~~~~~~
cleaning.cpp:153:18: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
153 | scanf("%d",&v);
| ~~~~~^~~~~~~~~