摘要:
Problem Statement题目大意是给定N个有序数字,delete一个数字a[x],产生能量a[x - 1] * a[x + 1],问说产生的最大能量是多少,第一个和最后一个不能delete。反过来考虑,insert操作,动态规划。#include <iostream>#include <vector>using namespace std;int dp[55][55];class CasketOfStar{public: int go(vector<int> w, int L, int R) { if(dp[L][R]) return dp[L][ 阅读全文
posted @ 2012-02-24 15:12
litstrong
阅读(248)
评论(0)
推荐(0)