摘要:
http://acm.nyist.net/JudgeOnline/problem.php?pid=104看了下别人的解题报告, 才知道原来还是相当于一维的数组的最大子序列的问题....只是将二维的数组转换为一维的数组继续求最大子序列View Code 1 #include <stdio.h> 2 #define maxn 101 3 int ans[maxn], temp[maxn][maxn]; 4 int row(int n, int ans[]) 5 { 6 int i, b=0, sum=-1000000; 7 for(i=0; i<n; i++) 8 { 9... 阅读全文
posted @ 2012-09-02 15:29
YORU
阅读(353)
评论(0)
推荐(0)
摘要:
http://acm.nyist.net/JudgeOnline/problem.php?pid=311View Code 1 #include <stdio.h> 2 #define maxn 50005 3 #define INF -1 4 int ans[maxn],v[maxn],w[maxn]; 5 int main() 6 { 7 int t, n, m, i, j; 8 scanf("%d",&t); 9 while(t--)10 {11 scanf("%d%d",&n,&m);12 for(i=0; i 阅读全文
posted @ 2012-09-02 11:17
YORU
阅读(138)
评论(0)
推荐(0)

浙公网安备 33010602011771号