摘要: 题目描述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 rectangle. In this problem the sub-rectangle with the largest sum is 阅读全文
posted @ 2013-08-16 16:22 WangLC 阅读(239) 评论(0) 推荐(0)
摘要: 示例输入25 6 -1 5 4 -77 0 6 -1 1 -6 7 -5示例输出Case 1:14 1 4Case 2:7 1 6 1 #include 2 int main() 3 { 4 int t; 5 scanf("%d",&t); 6 int cases=1; 7 while(t--) 8 { 9 int n,i;10 scanf("%d",&n);11 int sum=0,max=-9999;12 int start=1,end=1,tmp=1;13 int nu... 阅读全文
posted @ 2013-08-16 10:13 WangLC 阅读(186) 评论(0) 推荐(0)