题目1094:String Matching
2017-04-16 22:56
148 查看
#include <iostream>
#include <algorithm>
#include <queue>
#include <vector>
#include <cstring>
#include <stack>
#include <string>
#include <string.h>
#include <stdio.h>
#include <cmath>
#include <map>
#include <functional>
#include <set>
#include <limits.h>
#include <math.h>
#include <ctype.h>
using namespace std;
//1094
string t,p;
int main()
{
while(cin>>t>>p)
{
int a=t.find(p,0);
int ant=0;
while(a!=string::npos)
{
ant++;
a=t.find(p,a+1);
}
cout<<ant<<endl;
}
return 0;
}
/**************************************************************
Problem: 1094
User: cust123
Language: C++
Result: Accepted
Time:150 ms
Memory:3052 kb
****************************************************************/
相关文章推荐
- 题目1094:String Matching
- 九度oj-1094-String Matching
- 九度OJ—题目1094:String Matching
- HDUOJ A+Bproble 题目1089 1090 1091 1092 1093 1094 1095 1096
- 九度OJ 1094 String Matching
- 九度OJ 1094 String Matching
- <九度 OJ>题目1094:String Matching
- 拓扑排序,poj 1094
- LINUX运维笔试题目
- leedcode做题总结,题目Path SumI/II-------- 2012/10/13-14
- 一道让多少人掉坑里的题目
- Middle-题目132:347. Top K Frequent Elements(增补4)
- 随机获取题目中的试题号(注意函数的要求上下界包不包含)
- 一套出完被喷爆的noip提高组+的题目
- TYVJ 1094 矩形分割 解题报告
- 面试官喜欢问的跟项目有关的题目汇总
- DP---基本思想 具体实现 经典题目 POJ1160 POJ1037
- 九度OJ-题目1368:二叉树中和为某一值的路径
- Hard-题目13:72. Edit Distance
- 题目1207:质因数的个数