#P8703. [蓝桥杯 2019 国 B] 最优包含
[蓝桥杯 2019 国 B] 最优包含
Problem Description
We say that a string contains a string if is a subsequence of . That is, we can pick some characters from , and keep their original order to form a new string that is exactly the same as .
Given two strings and , find the minimum number of characters in that need to be modified so that contains .
Input Format
Input consists of two lines, each containing a string. The string on the first line is , and the string on the second line is . Both strings are non-empty and contain only uppercase English letters.
Output Format
Output one integer, which is the answer.
ABCDEABCD
XAABZ
3
Hint
For of the test cases, .
For of the test cases, .
For all test cases, .
Lanqiao Cup 2019 National Contest, Group B, Problem F.
Translated by ChatGPT 5