/in/foo.cc: In function 'int main()':
/in/foo.cc:18:5: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
for(int i=1,j=N;i<j;i++,j--)
^~~
/in/foo.cc:20:2: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'for'
for(int i=1;i<=N;i++){
^~~
/in/foo.cc:14:9: warning: array subscript is above array bounds [-Warray-bounds]
f[i][3]=min(f[i-1][1],min(f[i-1][2],f[i-1][3]))+(a[i]!=3);
~~~~~~^
/in/foo.cc:23:9: warning: array subscript is above array bounds [-Warray-bounds]
f[i][3]=min(f[i-1][1],min(f[i-1][2],f[i-1][3]))+(a[i]!=3);
~~~~~~^