HDU_2222 关键字查找(AC自动机应用)...
来源:互联网 发布:变声的视频软件 编辑:程序博客网 时间:2024/06/09 20:38
Keywords Search
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 5353 Accepted Submission(s): 1781
Problem Description
In the modern time, Search engine came into the life of everybody like Google, Baidu, etc.
Wiskey also wants to bring this feature to his image retrieval system.
Every image have a long description, when users type some keywords to find the image, the system will match the keywords with description of image and show the image which the most keywords be matched.
To simplify the problem, giving you a description of image, and some keywords, you should tell me how many keywords will be match.
Wiskey also wants to bring this feature to his image retrieval system.
Every image have a long description, when users type some keywords to find the image, the system will match the keywords with description of image and show the image which the most keywords be matched.
To simplify the problem, giving you a description of image, and some keywords, you should tell me how many keywords will be match.
Input
First line will contain one integer means how many cases will follow by.
Each case will contain two integers N means the number of keywords and N keywords follow. (N <= 10000)
Each keyword will only contains characters 'a'-'z', and the length will be not longer than 50.
The last line is the description, and the length will be not longer than 1000000.
Each case will contain two integers N means the number of keywords and N keywords follow. (N <= 10000)
Each keyword will only contains characters 'a'-'z', and the length will be not longer than 50.
The last line is the description, and the length will be not longer than 1000000.
Output
Print how many keywords are contained in the description.
Sample Input
15shehesayshrheryasherhs
Sample Output
3AC自动机...
- HDU_2222 关键字查找(AC自动机应用)...
- Keywords Search (HDU_2222) AC自动机
- hdu_2222 Keywords Search(AC自动机)
- hdu_2222: Keywords Search(AC自动机模板题)
- HDU_2222 Keywords Search 【AC自动机模板题】【动态链表】
- 字符串应用之AC自动机
- hdu 2896(ac自动机简单应用)
- bzoj3172 ac自动机fail树应用
- 利用AC自动机进行关键字的提取和过滤
- AC自动机...
- AC自动机
- AC 自动机
- AC自动机
- AC自动机
- ac自动机
- ac自动机
- AC自动机
- AC自动机
- 521
- 对结构型设计模式的理解
- Hudson-参数化构建
- [OS] PV操作
- C++容器
- HDU_2222 关键字查找(AC自动机应用)...
- A标签的css样式
- 使用Struts标签输出二维数组
- sqlite的介绍
- VS2008中自动加载word
- 最短路径算法
- antlr入门
- Apple Ajax搜索效果
- DELPHI三方控件说明