atcoder#ABC196F. [ABC196F] Substring 2
[ABC196F] Substring 2
Score : points
Problem Statement
Given are strings and consisting of 0
and 1
.
We will change some of the characters in so that becomes a substring of .
How many characters do we need to change at least?
What is a substring?
is said to be a substring of when some contiguous part of matches .
For example, 000
is a substring of 10001
, while 11
is not.
Constraints
- Each of and consists of
0
and1
.
Input
Input is given from Standard Input in the following format:
Output
Print the answer.
0001
101
1
Changing to 001
makes it match the -nd through -th characters of .
0101010
1010101
7
10101000010011011110
0010011111
1