Uva 10340 all in all (字符串匹配)
[cpp]#include <iostream>
#include <string>
using namespace std;
int main(int argc, char *argv[])
{
string a,b;
int i,j,flag;
while(cin>>a>>b)
{
for(flag=j=i=0;i<a.length();i++)
{
while(a[i]!=b[j])
{
j++;
if(j>=b.length()) {flag=1;break;}
} www.zzzyk.com
j++;
if(j>b.length()) {flag=1;break;}
if(flag) break;
}
if(flag) cout<<"No"<<endl;
else cout<<"Yes"<<endl;
}
return 0;
}
补充:软件开发 , C++ ,