#Q59. 「一本通 2.4 例 1」Keywords Search
「一本通 2.4 例 1」Keywords Search
Description
Original problem from: HDU 2222
Given words to query, each with a length not exceeding 50 and composed of lowercase English letters, and an article of length , determine how many of the query words appear in the article. There are multiple test cases.
Input Format
The first line contains an integer , representing the number of test cases. For each test case, the first line contains an integer , followed by lines each representing a word. The last line contains a string representing the article.
Output Format
For each test case, output a number indicating how many of the query words appear in the article.
Sample 1
1
5
she
he
say
shr
her
yasherhs
3
Data Range and Hint
For all data, .