摘要: 又一道双进程DP,状态转移方程如下:f(k,i,j)=max(f(k-1,i,j),f(k-1,i-1,j),f(k-1,i,j-1),f(k-1,i-1,j-1))然后f(k,i,j)加上(i,k-i)和(j,k-j)上的interesting locations。注意i和j相等的情况。#include<iostream>#include<cstdio>#include<cstring>using namespace std;int map[110][110];int res[211][110][110];inline int max(int a,int 阅读全文
posted @ 2012-03-21 13:28 书山有路,学海无涯 阅读(332) 评论(0) 推荐(0) 编辑