简单的字符串匹配 poj1936
2013-01-05 23:27
423 查看
#include<iostream> #include<string> using namespace std; int main() { char s[100005],t[100005]; int i,j,len1,len2; while(scanf("%s %s",s,t)!=EOF) { len1=strlen(s); len2=strlen(t); i=0; j=0; while(i<len1 && j<len2) { if(s[i]==t[j]) { i++; j++; } else { j++; } } if(i==len1) cout<<"Yes"<<endl; else cout<<"No"<<endl; } return 0; }
相关文章推荐
- poj 1936 All in All 简单的字符串匹配
- POJ 1936 All in All 字符串匹配
- [POJ](1936)All in All ---字符串匹配(串)
- POJ 1035 Spell checker 简单字符串匹配
- POJ 1936(字符串匹配)
- poj1035 简单字符串匹配
- POJ 1936 All in All(简单的字符串的字符列)
- POJ 1936(字符串匹配) 解题报告
- POJ 1936(字符串匹配) 解题报告
- POJ 1080 Human Gene Functions(字符串匹配得分,dp)
- poj_1068 字符串匹配
- Python做简单的字符串匹配详解
- 简单字符串匹配
- KMP 字符串匹配 POJ 3461 Oulipo
- poj_1936 All in All(简单字符串)
- poj 3461 Oulipo kmp字符串匹配
- poj-3461 kmp字符串匹配问题
- [压位 || FFT] 【Hillan 的题】简单字符串匹配
- FZU 2183 简单题(字符串匹配|字符串压缩)(简单)
- POJ 3461 Oulipo(KMP字符串匹配)