hdu 2222Keywords Search(AC自动机入门好题)
来源:互联网 发布:贴吧发帖软件 编辑:程序博客网 时间:2024/05/29 19:05
Keywords Search
Time Limit : 2000/1000ms (Java/Other) Memory Limit : 131072/131072K (Java/Other)
Total Submission(s) : 2 Accepted Submission(s) : 2
Font: Times New Roman | Verdana | Georgia
Font Size: ← →
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
3
Author
阅读全文
0 0
- hdu 2222Keywords Search(AC自动机入门好题)
- hdu 2222 Keywords Search ac自动机入门
- hdu 2222 Keywords Search(AC自动机入门题)
- HDU 2222 Keywords Search (AC自动机入门题)
- HDU 2222 Keywords Search(AC自动机入门题)
- HDU 2222 Keywords Search AC自动机入门模版题
- HDU 2222 Keywords Search AC自动机入门题
- hdu 2222 Keywords Search (ac自动机入门题)
- hdu 2222 Keywords Search(AC自动机入门模版题)
- hdu 2222 Keywords Search 经典AC自动机入门题
- HDU 2222:Keywords Search(AC自动机入门题)
- HDU-2222 Keywords Search (AC自动机入门题)
- HDU 2222 Keywords Search(AC自动机 入门)
- HDU 2222 Keywords Search (AC 自动机入门)
- HDU 2222 Keywords Search (AC自动机入门 模板)
- HDU 2222 Keywords Search (AC自动机入门题目)
- hdu 2222 Keywords Search(AC自动机入门)
- HDU-2222 Keywords Search (AC自动机入门)
- 动态表单设计
- 首字母转换大小写以及实体类是否存在某个方法名
- 线程池的探索
- c++ gb2312 utf8 转换函数
- 单词记忆
- hdu 2222Keywords Search(AC自动机入门好题)
- Yii2权限管理之ACF
- LightOJ 1341 Aladdin and the Flying Carpet
- 多线程编程
- ajax
- 找出动词前面的并以动词命名
- 【Python版】OpenCV学习笔记(1):安装
- signal-利用中断信号来干别的事情
- 同源策略及跨域