joi2019_ho_t4.cpp: In function 'int main()':
joi2019_ho_t4.cpp:44:20: warning: iteration 1 invokes undefined behavior [-Waggressive-loop-optimizations]
44 | dp[i][j]++;
| ~~~~~~~^
joi2019_ho_t4.cpp:7:40: note: within this loop
7 | #define loop(i,a,b) for(int i = (a); i < (b); i ++)
| ^
joi2019_ho_t4.cpp:43:9: note: in expansion of macro 'loop'
43 | loop(j,1,3){
| ^~~~
joi2019_ho_t4.cpp:97:24: warning: iteration 1 invokes undefined behavior [-Waggressive-loop-optimizations]
97 | dp[i+1][j] += dp[i][j];
| ~~~~~~~~~~~^~~~~~~~~~~
joi2019_ho_t4.cpp:7:40: note: within this loop
7 | #define loop(i,a,b) for(int i = (a); i < (b); i ++)
| ^
joi2019_ho_t4.cpp:96:9: note: in expansion of macro 'loop'
96 | loop(j,1,3){
| ^~~~
joi2019_ho_t4.cpp:44:20: warning: array subscript 2 is above array bounds of 'int [2]' [-Warray-bounds]
44 | dp[i][j]++;
| ~~~~~~~^
joi2019_ho_t4.cpp:44:20: warning: array subscript 2 is above array bounds of 'int [2]' [-Warray-bounds]
joi2019_ho_t4.cpp:61:24: warning: array subscript 2 is above array bounds of 'int [2]' [-Warray-bounds]
61 | dp[x][2]--;
| ~~~~~~~^
joi2019_ho_t4.cpp:61:24: warning: array subscript 2 is above array bounds of 'int [2]' [-Warray-bounds]
joi2019_ho_t4.cpp:58:24: warning: array subscript 2 is above array bounds of 'int [2]' [-Warray-bounds]
58 | dp[n][2]--;
| ~~~~~~~^
joi2019_ho_t4.cpp:58:24: warning: array subscript 2 is above array bounds of 'int [2]' [-Warray-bounds]
joi2019_ho_t4.cpp:54:24: warning: array subscript 2 is above array bounds of 'int [2]' [-Warray-bounds]
54 | dp[1][2]--;
| ~~~~~~~^
joi2019_ho_t4.cpp:54:24: warning: array subscript 2 is above array bounds of 'int [2]' [-Warray-bounds]
joi2019_ho_t4.cpp:83:35: warning: array subscript 2 is above array bounds of 'int [2]' [-Warray-bounds]
83 | if(dp[i][1] > 0 && dp[i][2] < 0){
| ~~~~~~~^
joi2019_ho_t4.cpp:87:22: warning: array subscript 2 is above array bounds of 'int [2]' [-Warray-bounds]
87 | dp[i][2] += trans;
| ~~~~~~~~~^~~~~~~~
joi2019_ho_t4.cpp:89:40: warning: array subscript 2 is above array bounds of 'int [2]' [-Warray-bounds]
89 | else if(dp[i][1] < 0 && dp[i][2] > 0){
| ~~~~~~~^
joi2019_ho_t4.cpp:93:22: warning: array subscript 2 is above array bounds of 'int [2]' [-Warray-bounds]
93 | dp[i][2] -= trans;
| ~~~~~~~~~^~~~~~~~
joi2019_ho_t4.cpp:97:24: warning: array subscript 2 is above array bounds of 'int [2]' [-Warray-bounds]
97 | dp[i+1][j] += dp[i][j];
| ~~~~~~~~~~~^~~~~~~~~~~
joi2019_ho_t4.cpp:97:34: warning: array subscript 2 is above array bounds of 'int [2]' [-Warray-bounds]
97 | dp[i+1][j] += dp[i][j];
| ~~~~~~~^
joi2019_ho_t4.cpp:97:24: warning: array subscript 2 is above array bounds of 'int [2]' [-Warray-bounds]
97 | dp[i+1][j] += dp[i][j];
| ~~~~~~~~~~~^~~~~~~~~~~
joi2019_ho_t4.cpp:98:31: warning: array subscript 2 is above array bounds of 'int [2]' [-Warray-bounds]
98 | ans += abs(dp[i][j]);
| ~~~~~~~^
joi2019_ho_t4.cpp:99:22: warning: array subscript 2 is above array bounds of 'int [2]' [-Warray-bounds]
99 | dp[i][j] -= dp[i][j];
| ~~~~~~~~~^~~~~~~~~~~