1141 DP 括号序列
摘要:自底向上递推,打表,分析补全括号的各种最优情况。#include <iostream>#include <string>#include <iomanip>using namespace std;#define max 110#define INF 10000000;int d[max][max];string ans[max][max];char s[110];int n;char rev(char a){ if(a=='(') return ')'; else if(a==')') return '
阅读全文
posted @ 2012-07-11 15:25

浙公网安备 33010602011771号