/in/foo.cc: In function 'int dfs(int)':
/in/foo.cc:18:1: warning: no return statement in function returning non-void [-Wreturn-type]
}
^
/in/foo.cc:12:8: warning: array subscript is above array bounds [-Warray-bounds]
f[v][1]=1;
~~~~~~^
/in/foo.cc:15:27: warning: array subscript is above array bounds [-Warray-bounds]
f[v][0]+=f[tree[v][i]][1];
~~~~~~~~~~~~~~~^
/in/foo.cc:16:16: warning: array subscript is above array bounds [-Warray-bounds]
f[v][1]+=min1(f[tree[v][i]][0],f[tree[v][i]][1]);
~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/in/foo.cc:16:50: warning: array subscript is above array bounds [-Warray-bounds]
f[v][1]+=min1(f[tree[v][i]][0],f[tree[v][i]][1]);
^
/in/foo.cc:16:10: warning: array subscript is above array bounds [-Warray-bounds]
f[v][1]+=min1(f[tree[v][i]][0],f[tree[v][i]][1]);
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/in/foo.cc: In function 'int main()':
/in/foo.cc:37:34: warning: array subscript is above array bounds [-Warray-bounds]
cout<<min1(f[root][0],f[root][1]);
^