Time Limit: 2 sec / Memory Limit: 1024 MB
SSTT
cabacc
abc
1
For example, changing the fourth character a in SS to c will match the second through fourth characters in SS to TT.
Since SS itself does not have TT as its substring, this number of changes - one - is the minimum needed.