这题写的挺顺利的,提交时出现了RE错误,经过修改发现是数组不够大
//子序列 UVa10340
#include<stdio.h>
#include<string.h>
#include<ctype.h>
char yuan[110000];
char shan1[110000];
int main()
{
while(scanf("%s",yuan) != EOF)
{
scanf("%s",shan1);
int lony = strlen(yuan);
int lons = strlen(shan1);
//for(int i =0;i<lons;i++)
// shan1[i]=tolower(shan1[i]);
//for(int i =0;i<lony;i++)
// yuan[i]=tolower(yuan[i]);
int k = 0,d = 0;
for(int c =0;c<lony;c++)
for(int j = d;j<lons;j++)
{
if(yuan[c] == shan1[j])
{
k++;
d = j+1;
break;
}
}
if(k == lony)
printf("Yes\n");
else
printf("No\n");
}
return 0;
}