HDU 1081 - To The Max
Problem : Find the maximum valued subrectangle.
Solution : Let b[i][j][k] to be the sum(a[i][j], a[i-1][j], ..., a[i-k+1][j]). Then let f[i][j][k] to be the maximum valued subrectangle which ended at (i, j) with height k. Then f[i][j][k]=max(b[i][j][k], f[i][j-1][k]+b[i][j][k]).