lamp.cpp: In function 'void solve()':
lamp.cpp:45:16: warning: array subscript is above array bounds [-Warray-bounds]
dp[0][4] = 2;
~~~~~~~^
lamp.cpp:46:16: warning: array subscript is above array bounds [-Warray-bounds]
dp[0][5] = INF;
~~~~~~~^
lamp.cpp:53:16: warning: array subscript is above array bounds [-Warray-bounds]
dp[0][4] = INF;
~~~~~~~^
lamp.cpp:54:16: warning: array subscript is above array bounds [-Warray-bounds]
dp[0][5] = 2;
~~~~~~~^
lamp.cpp:64:46: warning: array subscript is above array bounds [-Warray-bounds]
dp[i][0] = min(dp[i][0],dp[i-1][4]);
~~~~~~~~~^
lamp.cpp:65:47: warning: array subscript is above array bounds [-Warray-bounds]
dp[i][0] = min(dp[i][0],dp[i-1][5]);
^
lamp.cpp:65:46: warning: array subscript is above array bounds [-Warray-bounds]
dp[i][0] = min(dp[i][0],dp[i-1][5]);
~~~~~~~~~^
lamp.cpp:76:46: warning: array subscript is above array bounds [-Warray-bounds]
dp[i][3] = min(dp[i][3],dp[i-1][4]);
~~~~~~~~~^
lamp.cpp:77:47: warning: array subscript is above array bounds [-Warray-bounds]
dp[i][3] = min(dp[i][3],dp[i-1][5]);
^
lamp.cpp:77:46: warning: array subscript is above array bounds [-Warray-bounds]
dp[i][3] = min(dp[i][3],dp[i-1][5]);
~~~~~~~~~^
lamp.cpp:87:46: warning: array subscript is above array bounds [-Warray-bounds]
dp[i][1] = min(dp[i][1],dp[i-1][4]);
~~~~~~~~~^
lamp.cpp:89:20: warning: array subscript is above array bounds [-Warray-bounds]
dp[i][4] = INF;
~~~~~~~^
lamp.cpp:91:20: warning: array subscript is above array bounds [-Warray-bounds]
dp[i][5] = min(dp[i-1][0]+2,dp[i-1][1]+2);
~~~~~~~^
lamp.cpp:92:49: warning: array subscript is above array bounds [-Warray-bounds]
dp[i][5] = min(dp[i][5],dp[i-1][2]+1);
^
lamp.cpp:92:20: warning: array subscript is above array bounds [-Warray-bounds]
dp[i][5] = min(dp[i][5],dp[i-1][2]+1);
~~~~~~~^
lamp.cpp:93:20: warning: array subscript is above array bounds [-Warray-bounds]
dp[i][5] = min(dp[i][5],dp[i-1][3]+1);
~~~~~~~^
lamp.cpp:94:46: warning: array subscript is above array bounds [-Warray-bounds]
dp[i][5] = min(dp[i][5],dp[i-1][4]+1);
~~~~~~~~~^
lamp.cpp:94:20: warning: array subscript is above array bounds [-Warray-bounds]
dp[i][5] = min(dp[i][5],dp[i-1][4]+1);
~~~~~~~^
lamp.cpp:103:47: warning: array subscript is above array bounds [-Warray-bounds]
dp[i][2] = min(dp[i][2],dp[i-1][5]);
^
lamp.cpp:103:46: warning: array subscript is above array bounds [-Warray-bounds]
dp[i][2] = min(dp[i][2],dp[i-1][5]);
~~~~~~~~~^
lamp.cpp:105:20: warning: array subscript is above array bounds [-Warray-bounds]
dp[i][5] = INF;
~~~~~~~^
lamp.cpp:107:20: warning: array subscript is above array bounds [-Warray-bounds]
dp[i][4] = min(dp[i-1][0]+2,dp[i-1][2]+2);
~~~~~~~^
lamp.cpp:108:20: warning: array subscript is above array bounds [-Warray-bounds]
dp[i][4] = min(dp[i][4],dp[i-1][1]+1);
~~~~~~~^
lamp.cpp:109:20: warning: array subscript is above array bounds [-Warray-bounds]
dp[i][4] = min(dp[i][4],dp[i-1][3]+1);
~~~~~~~^
lamp.cpp:110:46: warning: array subscript is above array bounds [-Warray-bounds]
dp[i][4] = min(dp[i][4],dp[i-1][5]+1);
~~~~~~~~~^
lamp.cpp:110:20: warning: array subscript is above array bounds [-Warray-bounds]
dp[i][4] = min(dp[i][4],dp[i-1][5]+1);
~~~~~~~^
lamp.cpp: In function 'int main()':
lamp.cpp:127:71: warning: array subscript is above array bounds [-Warray-bounds]
cout << min({dp[n-1][0],dp[n-1][1],dp[n-1][2],dp[n-1][3],dp[n-1][4],dp[n-1][5]});
~~~~~~~~~^
lamp.cpp:127:82: warning: array subscript is above array bounds [-Warray-bounds]
cout << min({dp[n-1][0],dp[n-1][1],dp[n-1][2],dp[n-1][3],dp[n-1][4],dp[n-1][5]});
~~~~~~~~~^