&n
原创
2013-07-31 17:11:00
269阅读
题目:http://acm.hdu.edu.cn/showproblem.php?pid=1081
求最大子矩阵。
例如:
0 -2 -7 09 2 -6 2-4 1 -4 1-1 8 0 -2
最大的子矩阵:
9 2-4 1-1 8
和为15。
分析:
可以类比一维的连续子序列。
f[j][n][n]表示第j行到第n行(n-j+1为高)宽为n的矩阵,那么我们在计算这个矩阵的最大等高
转载
2013-07-29 19:13:00
19阅读
2评论
#include#include#include#include#include#include#include#include#includeusing namespace std;int main(){ int i,j,k; int go[100][100]; int n; int a[100],b[100]; int max
原创
2023-07-27 18:39:53
30阅读
思路:先转换为一维的然后就随便做啦,注意可能相加起来小于0的情况#includeu
原创
2023-06-09 18:23:20
2阅读
To The Max Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 12471 Accepted Submission(s): 5985 Pro
转载
2017-02-10 20:04:00
49阅读
"题目链接 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 g
原创
2021-07-22 14:11:07
55阅读
"题目链接 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 g
原创
2021-07-22 14:11:09
47阅读
题意:求最大子矩阵和。
解题思路:枚举上下边界 ,用一维思路去搞。
解题代码:
1 // File Name: 1081.cpp
2 // Author: darkdream
3 // Created Time: 2015年04月01日 星期三 16时57分14秒
4
5 #include<vector>
6 #include<list>
7 #incl
转载
2015-04-01 17:06:00
69阅读
2评论
1.题目链接。题目的大意就是给定一个矩阵,求出这个矩阵中的一个和最大的子矩阵。2.emmm,显然DP。我们肯定都写过HDU1003那个最大连续的子段是1...
原创
2022-07-01 10:32:57
65阅读
题目:http://acm.hdu.edu.cn/showproblem.php?pid=1081 自己真够垃圾的,明明做过一维的这种题,但遇到二维的这种题目,竟然不会了,
原题链接: http://acm.hdu.edu.cn/showproblem.php?pid=1081一:原题内容Problem DescriptionGivee is any contiguous sub-arra
原创
2022-12-07 00:02:46
31阅读
最大字段和题型,推荐做题顺序: HDU1003 HDU1024 HDU1081 ZOJ2975 ZOJ2067
转载
2017-09-27 21:06:00
68阅读
To The MaxTime Limit: 2000/1000 MS (Java/Others) Memory Lim
转载
2012-08-29 23:36:00
34阅读
2评论
To The MaxTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 12418 Accepted Submission(s): 5959Problem DescriptionGiven a two-di
原创
2022-09-07 11:05:25
34阅读
To The MaxTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 10747 Accepted Submission(s): 5149Problem DescriptionGiven a two-di
原创
2022-08-10 10:57:28
26阅读
To The MaxTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 4825Accepted Submission(s): 2281Problem DescriptionGiven a two-dimensional array of positive and negative integers, a sub-rectangle is any contiguous sub-array of size 1 x 1 or greater locat
原创
2021-07-29 16:23:47
74阅读
To The MaxTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 4437 Accepted Submission(s): 2099Problem DescriptionGiven a two-dimensional array of positive and negative integers, a sub-rectangle is any contiguous sub-array of size 1 x 1 or greater loc
转载
2012-05-18 21:45:00
26阅读
Problem DescriptionGiven a two-dimensional array of positive and negative integers, a sub-rectange sum of a
原创
2023-04-24 07:39:10
43阅读
http://acm.hdu.edu.cn/showproblem.php?pid=1081 1 #include 2 #include 3 #include 4 #define maxn 300 5 using namespace std; 6 const int inf=0x7fffffff; 7 8 int dp[maxn][maxn]; 9 int a[maxn][maxn];10 11 int main()12 {13 int n;14 while(scanf("%d",&n)!=EOF)15 {16 for(int i=1; i<=n...
转载
2014-04-04 20:50:00
24阅读
2评论
求子矩阵的最大和对于样例:0 -2 -7 09 2 -6 2-4 1 -4 1-1 8 0 -2其最大子矩阵为9 2-4 1-1 8这个子矩阵的和为15想明白后,这是个最大连续子序列的变形sum[k]存放的是矩阵中第k列从第i行到第j行的和每次求出sum数组的最大...
转载
2014-07-27 12:13:00
59阅读
2评论