/in/foo.cc: In function 'void dfs(int)':
/in/foo.cc:23:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i=0;i<g[x].size();i++){
~^~~~~~~~~~~~
/in/foo.cc: In function 'int main()':
/in/foo.cc:50:18: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'int' [-Wformat=]
scanf("%d",w[i]);
~~~~^
/in/foo.cc:67:9: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
if(flag=0){
~~~~^~
/in/foo.cc:73:9: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
if(flag=0){
~~~~^~