dango_maker.cpp: In function 'int main()':
dango_maker.cpp:27:10: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
freopen(taskname".INP", "r",stdin);
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
dango_maker.cpp:28:10: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
freopen(taskname".OUT", "w",stdout);
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
dango_maker.cpp:37:46: warning: array subscript is above array bounds [-Warray-bounds]
dp[i][0] = dp[i][1] = dp[i][2] = 0;
~~~~~~~^
dango_maker.cpp:39:40: warning: array subscript is above array bounds [-Warray-bounds]
if(Rig(i,dia-i))dp[i][2] = 1;
~~~~~~~^
dango_maker.cpp:40:43: warning: array subscript is above array bounds [-Warray-bounds]
tmp = max(dp[i][1],dp[i][2]);
~~~~~~~^
dango_maker.cpp:42:74: warning: array subscript is above array bounds [-Warray-bounds]
dp[i][0] = max({dp[i - 1][0] , dp[i - 1][1] , dp[i - 1][2]});
~~~~~~~~~~~^
dango_maker.cpp:45:74: warning: array subscript is above array bounds [-Warray-bounds]
if(Rig(i,dia-i))dp[i][2] = max(dp[i - 1][0] , dp[i - 1][2]) + 1;
~~~~~~~~~~~^
dango_maker.cpp:45:40: warning: array subscript is above array bounds [-Warray-bounds]
if(Rig(i,dia-i))dp[i][2] = max(dp[i - 1][0] , dp[i - 1][2]) + 1;
~~~~~~~^
dango_maker.cpp:46:29: warning: array subscript is above array bounds [-Warray-bounds]
else dp[i][2] = 0;
~~~~~~~^
dango_maker.cpp:47:64: warning: array subscript is above array bounds [-Warray-bounds]
tmp = max({tmp , dp[i][0] , dp[i][1] , dp[i][2]});
~~~~~~~^