mergers.cpp: In function 'int main()':
mergers.cpp:28:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if(state[i].size()==sz[fin(state[i][0])])
~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
mergers.cpp:13:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d",&n,&k);
~~~~~^~~~~~~~~~~~~~~
mergers.cpp:14:67: 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 %d",&u,&v),g[u].push_back(v),g[v].push_back(u);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
mergers.cpp:15:60: 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",&belong[i]),p[i] = i,sz[i] = 1;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~