#P2758. 编辑距离
编辑距离
Description
Let and be two strings. We want to transform string into string using the minimum number of character operations. There are three types of operations:
- Delete one character.
- Insert one character.
- Replace one character with another.
Both and contain only lowercase letters.
Input Format
The first line contains string . The second line contains string . Both have length at most .
Output Format
Output a single positive integer, which is the minimum number of character operations.
sfdqxbw
gfdgw
4
Hint
For of the testdata, .
Translated by ChatGPT 5
京公网安备 11011102002149号