To the Max Time Limit: 2 Seconds Memory Limit: 65536 KB Problem 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 re…
没想到居然可以O(n3)暴力过 就是大概之前的 最大连续子序列和 加成2维度了 枚举起始列 和 终止列 然后计算从1到n行最大的子矩阵的和 注意n 和 m 的输入顺序!! #include<bits/stdc++.h> using namespace std; typedef long long ll; ; ll s[maxn][maxn],sum[maxn][maxn]; int main () { int m,n; scanf("%d %d",&m,&…
To the Max Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 39913 Accepted: 21099 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…