foo.cc: In function 'int dfs(int, int, int)':
foo.cc:31:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int k=0;k<v[i].size();k++)
~^~~~~~~~~~~~
foo.cc: In function 'int main()':
foo.cc:39:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d",&n,&m);
~~~~~^~~~~~~~~~~~~~
foo.cc:40:27: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
for(int i=0;i<m;i++)scanf("%d%d%d",&a[i].u,&a[i].v,&a[i].l);
~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务