dp求最长回文字串

注意的就是写出的状态方程无法通过i,j的枚举顺序得到正确的解,需要通过其他的方式,与之前的不同的还有dp数组内不一定要存储数据,也可以存储状态啊 #include <iostream>#include <stdio.h> #include <cstring>  using namespace std; const int maxn=1010; char s[maxn]; int dp[maxn][
相关文章
相关标签/搜索