bzoj#P2780. [SPOJ] 8093 Sevenk Love Oimaster
[SPOJ] 8093 Sevenk Love Oimaster
题目描述
Oimaster and sevenk love each other.
But recently,sevenk heard that a girl named ChuYuXun was dating with oimaster.As a woman's nature, sevenk felt angry and began to check oimaster's online talk with ChuYuXun.
Oimaster talked with ChuYuXun times, and each online talk actually is a string.Sevenk asks questions like this, "how many strings in oimaster's online talk contain this string as their substrings?"
题意:给出 个串 , 次询问,每次给定一个串 ,问 是多少个 的子串。
输入格式
There are two integers in the first line, the number of strings and the number of questions.
And lines follow, each of them is a string describing oimaster's online talk.
And lines follow, each of them is a question.
输出格式
For each question, output the answer in one line.
3 3
abcabcabc
aaa
aafe
abc
a
ca
1
3
1
数据规模与约定
对于 的数据,,,,。