文章
7
粉丝
254
获赞
2
访问
79.7k
#include
#include
using namespace std;
const int maxn = 1000;
char a[maxn], b[maxn];
int dp[maxn][maxn];
int main(){
//dp[i][j] == dp[i-1][j-1] + 1; a[i] == b[j]
// == 0;
while(scanf("%s %s", a, b) != EOF){
int alen = strlen(a);
int blen = strlen(b);
for(int i = 0; i <= alen; i++){ //col
dp[i][0] = 0;
}
for(int i = 0; i <= blen; i++){ // row
dp[0][i] = 0;
}
int ans = 0;
int e,s = 0;
&nbs...
登录后发布评论
暂无评论,来抢沙发