Score : $600$ points
Given are strings $S$ and $T$ consisting of 0
and 1
.
We will change some of the characters in $T$ so that $T$ becomes a substring of $S$.
How many characters do we need to change at least?
000
is a substring of 10001
, while 11
is not.
0
and 1
.Input is given from Standard Input in the following format:
$S$ $T$
Print the answer.
0001 101
1
Changing $T$ to 001
makes it match the $2$-nd through $4$-th characters of $S$.
0101010 1010101
7
10101000010011011110 0010011111
1