To The Max
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 9879 Accepted Submission(s): 4762
Problem Description
Given a two-dim...
分类:
其他好文 时间:
2015-08-20 22:36:00
阅读次数:
241
题意:
现在有一个n*n的矩阵,然后每个格子中都有一个字母(大写或小写组成)。然后询问你现在最大的对称子矩阵的边长是多少。注意这里的对角线是从左下角到右上角上去的。
思路:
这道题我自己写出了dp的定义式,但是要怎么转移方程并没有推出来。
我看了好久的题解才明白的,果然还是太弱。。。
首先我们定义:dp[i][j]为第i行第j列所能够组成的最大对称子矩阵的长度。
转移方程为:dp[i]...
分类:
其他好文 时间:
2015-08-20 01:29:55
阅读次数:
191
DescriptionGiven a two-dimensional array of positive and negative integers, a sub-rectangle is any contiguous sub-array of size 1*1 or greater located...
分类:
其他好文 时间:
2015-08-15 16:24:37
阅读次数:
89
最多只有2列..分开来dp1列 dp(x, k) = max( dp(x - 1, k), dp(p, k - 1) + sum(p+1~x) )2列 dp(a, b, k) = max( dp(a - 1, b, k), dp(a, b - 1, k), dp(p, b, k - 1) + sum...
分类:
其他好文 时间:
2015-08-15 16:23:48
阅读次数:
100
F -最大子矩阵和Time Limit:1000MSMemory Limit:10000KB64bit IO Format:%I64d & %I64uDescriptionGiven a two-dimensional array of positive and negative integers,...
分类:
其他好文 时间:
2015-08-13 21:45:32
阅读次数:
156
DescriptionGiven a two-dimensional array of positive and negative integers, a sub-rectangle is any contiguous sub-array of size 1*1 or greater located...
分类:
其他好文 时间:
2015-08-13 17:52:26
阅读次数:
108
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 within the...
分类:
其他好文 时间:
2015-08-12 21:30:31
阅读次数:
106
submatrix难度级别: A; 编程语言:不限;运行时间限制:2000ms; 运行空间限制:131072KB; 代码长度限制:102400B试题描述小A有一个N×M的矩阵,矩阵中1~N*M这(N*M)个整数均出现过一次。现在小A在这个矩阵内选择一个子矩阵,其权值等于这个子矩阵中的所有数的最小值。...
分类:
其他好文 时间:
2015-08-11 14:01:14
阅读次数:
268
题意:维护一个W*W的矩阵,初始值均为S.每次操作可以增加某格子的权值,或询问某子矩阵的总权值.修改操作数M<=160000,询问数Q<=10000,W<=2000000.这题在bz是贵族题= =,没有链接了解法:cdq分治,第一维是时间t,第二维是x,第三维是y;每个操作看作一个三维序(t, x, y);假设修改操作是(t, x, y),两个查询操作分别是(t1, x1, y1) 和 (t1, x...
分类:
其他好文 时间:
2015-08-10 01:58:06
阅读次数:
120
题意:r行c列的全0矩阵 有三种操作 1 x1 y1 x2 y2 v子矩阵(x1,y1,x2,y2)所有元素增加v 2x1 y1 x2 y2 v子矩阵(x1,y1,x2,y2)所有元素设为v 3x1 y1 x2 y2 查询子矩阵元素的和、最小值、...
分类:
其他好文 时间:
2015-08-09 22:25:38
阅读次数:
142