foo.cc: In function 'void dfs(int, int)':
foo.cc:61:18: warning: suggest explicit braces to avoid ambiguous 'else' [-Wdangling-else]
61 | travel( now ) if ( p -> t != fa ) if ( used[ p -> t ] ) {
| ^
foo.cc: In function 'int main()':
foo.cc:110:6: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
110 | scanf( "%d%d" , &n , &m ) ;
| ~~~~~^~~~~~~~~~~~~~~~~~~~
foo.cc:112:22: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
112 | int s , t , w ; scanf( "%d%d%d" , &s , &t , &w ) ;
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务