pipes.cpp: In function 'void dfs(int)':
pipes.cpp:14:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i=0;i<g[s].size();i++) if(!vi[g[s][i]]) dfs(g[s][i]);
~^~~~~~~~~~~~
pipes.cpp: In function 'int main()':
pipes.cpp:34:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i=0;i<g[u].size();i++) if(!vi[g[u][i]])
~^~~~~~~~~~~~
pipes.cpp:50:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i=0;i<c.size();i++) tz+=t[c[i]];
~^~~~~~~~~
pipes.cpp:52:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i=2;i<c.size();i+=2) parc[i]=parc[i-2]+t[c[i-2]];
~^~~~~~~~~
pipes.cpp:54:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i=3;i<=c.size();i+=2) parc[i]=parc[i-2]+t[c[i-2]];
~^~~~~~~~~~
pipes.cpp:55:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i=0;i<c.size()-1;i++) mp[make_pair(c[i],c[i+1])]=mp[make_pair(c[i+1],c[i])]=2*(parc[i+2]-parc[i+1]);
~^~~~~~~~~~~
pipes.cpp:19:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d",&n,&m);
~~~~~^~~~~~~~~~~~~~
pipes.cpp:20:29: 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("%lld",&t[i]);
~~~~~^~~~~~~~~~~~~~
pipes.cpp:23:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d",&gr[i][0],&gr[i][1]);
~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~