HDU 1081 to the max
摘要:
将二维的动态规划问题转话为一维的动态规划问题#include <iostream>#include<string.h>using namespace std;int sequence[110][110];int N;int main(){ while(cin>>N) { int i,j,k; int data; int ans=-9999; for(i=1;i<=N;i++) { for(j=1;j<=N;j++) { cin>>data; sequence[i][j]=sequence[i][j-1]+data;//sequence 阅读全文
posted @ 2011-05-22 22:13 lonelycatcher 阅读(196) 评论(0) 推荐(0) 编辑