To the Max Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 47985 Accepted: 25387 Description Given a two-dimensional array of positive and negative integers, a sub-rectangle is any contiguous sub-array of size 1*1 or greater located wi…
题意:求最大子矩阵和 利用dp[i]每次向下更新,构成竖起的单条矩阵,再按不小于零就加起来来更新,构成更大的矩阵 #include <iostream> #include<cstdio> #include<cstring> using namespace std; #define N 110 int map[N][N],dp[N]; int main(int argc, char** argv) { int n,i,j,k,maxn,ans; while(scanf(&…
题目链接 Problem - 1081 题意 Given a two-dimensional array of positive and negative integers, a sub-rectangle is any contiguous sub-array of size 1 x 1 or greater located within the whole array. The sum of a rectangle is the sum of all the elements in that…