foo.cc: In function 'void clear_all()':
foo.cc:26:54: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
26 | for(int i=0;i<=ctt;i++){clear(v[i]);lf[i]=line[i]=siz[i]=0;}
| ~~~~~~~^~~~~~~~~
foo.cc: In function 'void dfs1(int)':
foo.cc:33:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
33 | for(int i=0;i<v[x].size();i++)
| ~^~~~~~~~~~~~
foo.cc: In function 'int main()':
foo.cc:59:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
59 | {scanf("%d",&T);for(int z=1;z<=T;z++){solve();clear_all();}return 0;}//拜拜程序~
| ~~~~~^~~~~~~~~
foo.cc: In function 'void solve()':
foo.cc:44:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
44 | scanf("%d%d",&n,&k);ctt=n;
| ~~~~~^~~~~~~~~~~~~~
foo.cc:45:32: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
45 | for(int i=1;i<=n;i++){scanf("%d%d%d",&fa[i],&a[i],&w[i]);lf[fa[i]]=true;}
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务