/in/foo.cc: In function 'int work(int, int, int)':
/in/foo.cc:19:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
/in/foo.cc:11:20: warning: array subscript is above array bounds [-Warray-bounds]
if (map[p][q][1] == t) if (min>0) min=0;
~~~~~~~~~~~^
/in/foo.cc:15:16: warning: array subscript is above array bounds [-Warray-bounds]
map[p][q][1]=3;
~~~~~~~~~~~^
/in/foo.cc:18:36: warning: array subscript is above array bounds [-Warray-bounds]
if (map[p+dx[i]][q+dy[i]][1] != 3) work(p+dx[i],q+dy[i],map[p+dx[i]][q+dy[i]][1]);
~~~~~~~~~~~~~~~~~~~~~~~^
/in/foo.cc: In function 'int main()':
/in/foo.cc:27:24: warning: array subscript is above array bounds [-Warray-bounds]
map[i][j][1]=2;
~~~~~~~~~~~^
/in/foo.cc:31:20: warning: array subscript is above array bounds [-Warray-bounds]
map[a][b][1]=c;
~~~~~~~~~~~^
/in/foo.cc:33:13: warning: array subscript is above array bounds [-Warray-bounds]
ans=work(1,1,map[1][1][1]);
~~~~^~~~~~~~~~~~~~~~~~