[LuoGu] P2758 编辑距离

\(\color{red}{\mathcal{Description}}\)

\(A\)\(B\) 是两个字符串。我们要用最少的字符操作次数,将字符串 \(A\) 转换为字符串 \(B\) 。这里所说的字符操作共有三种:

1、删除一个字符;

2、插入一个字符;

3、将一个字符改为另一个字符;

皆为小写字母

\(\color{red}{\mathcal{Input\ Format}}\)

第一行为字符串 \(A\) ;第二行为字符串 \(B\)

\(\color{red}{\mathcal{Output\ Format}}\)

只有一个正整数,为最少字符操作次数。

\(\color{red}{\mathcal{DataSize\ Agreement}}\)

字符串 \(A\)\(B\) 的长度均小于\(2000\)

\(\color{red}{\mathcal{Solution}}\)

猜你喜欢

转载自www.cnblogs.com/1miharu/p/11328951.html
今日推荐