/in/foo.cc: In function 'int main()':
/in/foo.cc:13:54: warning: array subscript is above array bounds [-Warray-bounds]
f[i&1][j+cut]=max(f[(i&1)^1][j+cut],f[(i&1)^1][j+h[i]+cut]+h[i]);
~~~~~~~~~^
/in/foo.cc:13:72: warning: array subscript is above array bounds [-Warray-bounds]
f[i&1][j+cut]=max(f[(i&1)^1][j+cut],f[(i&1)^1][j+h[i]+cut]+h[i]);
^
/in/foo.cc:13:14: warning: array subscript is above array bounds [-Warray-bounds]
f[i&1][j+cut]=max(f[(i&1)^1][j+cut],f[(i&1)^1][j+h[i]+cut]+h[i]);
~~~~~^
/in/foo.cc:14:51: warning: array subscript is above array bounds [-Warray-bounds]
f[i&1][j+cut]=max(f[(i&1)^1][j+cut],f[(i&1)^1][j-h[i]+cut]+h[i]);
~~~~~~~~~^
/in/foo.cc:14:69: warning: array subscript is above array bounds [-Warray-bounds]
f[i&1][j+cut]=max(f[(i&1)^1][j+cut],f[(i&1)^1][j-h[i]+cut]+h[i]);
^
/in/foo.cc:14:11: warning: array subscript is above array bounds [-Warray-bounds]
f[i&1][j+cut]=max(f[(i&1)^1][j+cut],f[(i&1)^1][j-h[i]+cut]+h[i]);
~~~~~^