| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
贴代码了0ms秒过#include<iostream>
#include<string.h>
#include<cstdio>
using namespace std;
int i,j,l1,l2;
bool flag;
char c1[100001],c2[100001];
int main()
{
while(~scanf("%s%s",c1,c2))
{
l1=strlen(c1);
l2=strlen(c2);
if(l1>l2)
{
cout<<"No"<<endl;
continue;
}
for(i=0;i<l1;i++)
if(c1[i]>='A'&&c1[i]<='Z')c1[i]-='A'-'a';
for(i=0;i<=l2;++i)
if(c2[i]>='A'&&c2[i]<='Z')c2[i]-='A'-'a';
i=0;
for(j=0;j<l2;++j)if(c1[i]==c2[j])i++;
if(i==l1)cout<<"Yes"<<endl;else cout<<"No"<<endl;
}
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator