mergers.cpp: In function 'void dfs1(int, int)':
mergers.cpp:10:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i=0;i<g[s].size();i++) if(g[s][i]!=f) dfs1(g[s][i],s);
~^~~~~~~~~~~~
mergers.cpp: In function 'void dfs2(int, int)':
mergers.cpp:16:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i=0;i<g[s].size();i++) if(g[s][i]!=f) dfs2(g[s][i],s);
~^~~~~~~~~~~~
mergers.cpp: In function 'bool dfs3(int, int)':
mergers.cpp:24:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i=0;i<g[s].size();i++) if(g[s][i]!=f) if(dfs3(g[s][i],s)) d=true;
~^~~~~~~~~~~~
mergers.cpp: In function 'void dfs4(int, int)':
mergers.cpp:32:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i=0;i<g[s].size();i++) if(g[s][i]!=f) dfs4(g[s][i],s);
~^~~~~~~~~~~~
mergers.cpp: In function 'int main()':
mergers.cpp:36:16: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
int n,k; scanf("%d %d",&n,&k);
~~~~~^~~~~~~~~~~~~~~
mergers.cpp:37:42: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
for(int i=0;i<n-1;i++) {int t1,t2; scanf("%d%d",&t1,&t2); g[t1].push_back(t2); g[t2].push_back(t1);}
~~~~~^~~~~~~~~~~~~~~~
mergers.cpp:38:29: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
for(int i=1;i<=n;i++) scanf("%d",&fa[i]);
~~~~~^~~~~~~~~~~~~