#include <iostream.h>
#include <string.h>
#include <fstream.h>
ifstream f("all.in");
#define cin f
int main()
{
char a[10000],b[10000];
while(cin>>a>>b)
{
int flag=0;
int pos1=strlen(a)-1;
int pos2=strlen(b)-1;
while(1)
{
if(a[pos1]==b[pos2])
{
pos1--;
pos2--;
}
else
pos2--;
if (pos1<0) {flag=0;break;}
if (pos2<0 && pos1>=0) {flag=1;break;}
}
if(flag) cout<<"No"<<endl;
else
cout<<"Yes"<<endl;
}
}
正文
jnu(all in all)2005-08-18 16:22:00
【评论】 【打印】 【字体:大 中 小】 本文链接:http://blog.pfan.cn/elva6401/3920.html
阅读(1856) | 评论(0)
版权声明:编程爱好者网站为此博客服务提供商,如本文牵涉到版权问题,编程爱好者网站不承担相关责任,如有版权问题请直接与本文作者联系解决。谢谢!
评论