文件名称:KMP
-
所属分类:
- 标签属性:
- 上传时间:2016-07-13
-
文件大小:1.77mb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
KMP算法实现,能够实现字符串匹配。
输入
第一行一个整数N,表示测试数据组数。
接下来的N*2行,每两行表示一个测试数据。在每一个测试数据中,第一行为模式串,由不超过10^4个大写字母组成,第二行为原串,由不超过10^6个大写字母组成。
其中N< 20
输出
对于每一个测试数据,按照它们在输入中出现的顺序输出一行Ans,表示模式串在原串中出现的次数。-KMP algorithm, to achieve string matching.
nput
The first line is an integer N, indicating the number of test data sets.
The next N*2 lines, each of the two lines that a test data. In each test data, the first behavior pattern string, by no more than 10^4 capital letters, second behavior of the original string, by no more than 10^6 capital letters.
Among them N< 20
output
For each test data, in accordance with the order in which they appear in the input line Ans, the number of times that the pattern string appears in the original string.
输入
第一行一个整数N,表示测试数据组数。
接下来的N*2行,每两行表示一个测试数据。在每一个测试数据中,第一行为模式串,由不超过10^4个大写字母组成,第二行为原串,由不超过10^6个大写字母组成。
其中N< 20
输出
对于每一个测试数据,按照它们在输入中出现的顺序输出一行Ans,表示模式串在原串中出现的次数。-KMP algorithm, to achieve string matching.
nput
The first line is an integer N, indicating the number of test data sets.
The next N*2 lines, each of the two lines that a test data. In each test data, the first behavior pattern string, by no more than 10^4 capital letters, second behavior of the original string, by no more than 10^6 capital letters.
Among them N< 20
output
For each test data, in accordance with the order in which they appear in the input line Ans, the number of times that the pattern string appears in the original string.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
KMP/Debug/KMP.exe
KMP/Debug/KMP.ilk
KMP/Debug/KMP.pdb
KMP/KMP/Debug/KMP.log
KMP/KMP/Debug/KMP.tlog/cl.command.1.tlog
KMP/KMP/Debug/KMP.tlog/CL.read.1.tlog
KMP/KMP/Debug/KMP.tlog/CL.write.1.tlog
KMP/KMP/Debug/KMP.tlog/KMP.lastbuildstate
KMP/KMP/Debug/KMP.tlog/link.command.1.tlog
KMP/KMP/Debug/KMP.tlog/link.read.1.tlog
KMP/KMP/Debug/KMP.tlog/link.write.1.tlog
KMP/KMP/Debug/main.obj
KMP/KMP/Debug/vc120.idb
KMP/KMP/Debug/vc120.pdb
KMP/KMP/KMP.vcxproj
KMP/KMP/KMP.vcxproj.filters
KMP/KMP/main.cpp
KMP/KMP.sdf
KMP/KMP.sln
KMP/KMP.v12.suo
KMP/KMP/Debug/KMP.tlog
KMP/KMP/Debug
KMP/Debug
KMP/KMP
KMP
KMP/Debug/KMP.ilk
KMP/Debug/KMP.pdb
KMP/KMP/Debug/KMP.log
KMP/KMP/Debug/KMP.tlog/cl.command.1.tlog
KMP/KMP/Debug/KMP.tlog/CL.read.1.tlog
KMP/KMP/Debug/KMP.tlog/CL.write.1.tlog
KMP/KMP/Debug/KMP.tlog/KMP.lastbuildstate
KMP/KMP/Debug/KMP.tlog/link.command.1.tlog
KMP/KMP/Debug/KMP.tlog/link.read.1.tlog
KMP/KMP/Debug/KMP.tlog/link.write.1.tlog
KMP/KMP/Debug/main.obj
KMP/KMP/Debug/vc120.idb
KMP/KMP/Debug/vc120.pdb
KMP/KMP/KMP.vcxproj
KMP/KMP/KMP.vcxproj.filters
KMP/KMP/main.cpp
KMP/KMP.sdf
KMP/KMP.sln
KMP/KMP.v12.suo
KMP/KMP/Debug/KMP.tlog
KMP/KMP/Debug
KMP/Debug
KMP/KMP
KMP
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.