JZPGYZ - Sevenk Love Oimaster

题意翻译

# 题目大意 给定 $n$ 个模板串,以及 $m$ 个查询串 依次查询每一个查询串是多少个模板串的子串 # sample input ``` plain 3 3 abcabcabc aaa aafe abc a ca ``` # sample output ``` plain 1 3 1 ``` # 样例解释 `abc`在`abcabcabc`中出现了,所以第一个询问答案为`1` `a`在三个字符串中都出现了,所以第二个询问答案为`2` `ca`只在`abcabcabc`中出现了,所以第三个询问的答案为`3` 感谢@KingSann 提供的翻译

题目描述

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 n times, and each online talk actually is a string.Sevenk asks q questions like this, "how many strings in oimaster's online talk contain this string as their substrings?" Input There are two integers in the first line, the number of strings n and the number of questions q. And n lines follow, each of them is a string describing oimaster's online talk. And q lines follow, each of them is a question.n<=10000, q<=60000 the total length of n strings<=100000, the total length of q question strings<=360000 Output For each question, output the answer in one line. Example

输入输出格式

输入格式


输出格式


输入输出样例

暂无测试点