摘要:
AcWing-900 思路: 转换成完全背包问题 时间复杂度: o(n^3) AC代码: #include <iostream> #include <algorithm> using namespace std; const int N=1010,mod=1e9+7; int n; int f[N] 阅读全文
摘要:
p2758-编辑距离 思路: 用f[i][j]表示第一个字符串的前 i 个字母变为第二个字符串的前 j 个字母所用的最少操作次数。 假设第一个字符串为:AGTCTGACGC 第二个字符串为:AGTAAGTAGGC f[3][5] 表示把第一个字符串的前三个字母变为第二个字符串的前五个字母所需要的最少 阅读全文