#P2331. [SCOI2005] 最大子矩阵
[SCOI2005] 最大子矩阵
Description
There is an matrix. Please choose submatrices so that the sum of their scores is maximized.
Note: The chosen submatrices must be pairwise non-overlapping (no two share any cell).
Input Format
The first line contains . Each of the next lines contains integers, the scores of the elements in the matrix. The absolute value of each element’s score does not exceed .
Output Format
Output a single line containing the maximum possible sum of the scores of the submatrices.
3 2 2
1 -3
2 3
-2 3
9
Hint
For of the testdata, , , .
Translated by ChatGPT 5
京公网安备 11011102002149号