摘要:
"计算字符串距离" 同样也是字符串距离计算问题,参考 "一本通 1276:【例9.20】编辑距离" Code: c++ include include include using namespace std; //Mystery_Sky // define INF 0x3f3f3f3f define 阅读全文
摘要:
"滑雪" 记忆化搜索 Code: c++ include include include using namespace std; //Mystery_Sky // define M 500 define INF 0x3f3f3f3f int f[M][M]; int r, c, map[M][M] 阅读全文
摘要:
"编辑距离" Code: c++ include include include using namespace std; //Mystery_Sky // define INF 0x3f3f3f3f define M 3000 int f[M][M]; int len_a, len_b; char 阅读全文
摘要:
"乘积最大(数据弱化版)" ps:本题无需使用大整数。 Code: c++ include include include using namespace std; //Mystery_Sky // define INF 0x3f3f3f3f define M 500 int f_max[M][M] 阅读全文
摘要:
"合并石子" 状态转移方程:f_min[i][i] = 0, f_min[i][j] = min(f_min[i][k] + f_min[k+1][j] + sum[j] sum[i 1]; Code: c++ include include include using namespace std; 阅读全文