Introduction - If you have any usage issues, please Google them yourself
KMP algorithm, to achieve string matching.
nput
The first line is an integer N, indicating the number of test data sets.
The next N*2 lines, each of the two lines that a test data. In each test data, the first behavior pattern string, by no more than 10^4 capital letters, second behavior of the original string, by no more than 10^6 capital letters.
Among them N< 20
output
For each test data, in accordance with the order in which they appear in the input line Ans, the number of times that the pattern string appears in the original string.