beads.cpp: In function 'void Solve(int, int, int)':
beads.cpp:27:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i=0;i<E[u].size();i++) if(E[u][i].first!=p)
~^~~~~~~~~~~~
beads.cpp:28:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int j=i+1;j<E[u].size();j++) if(E[u][j].first!=p)
~^~~~~~~~~~~~
beads.cpp: In function 'int main()':
beads.cpp:43:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%i",&n);
~~~~~^~~~~~~~~
beads.cpp:44:62: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
for(i=1;i<n;i++) scanf("%i %i %i",&u,&v,&w),E[u].pb(mp(v,w)),E[v].pb(mp(u,w));
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~