All in all
#include<stdio.h>
#include<string.h>
char t[100000] , s[100000] ;
int main()
{
#ifndef ONLINE_JUDGE
freopen ("All in All.txt","r",stdin);
#endif
int lent , lens , flag , i , j , k ;
while( EOF != ( scanf("%s%s",t,s) ) )
{
lent = strlen (t) ;
lens = strlen (s) ;
k = 0 ;
for( i = 0 ; i < lent ; i++ )
{
flag = 0 ;
for( j = k ; j < lens ; j++ )
{
if( t[i] == s[j] )
{
k = j + 1 ;
flag = 1 ;
break ;
}
}
if( flag == 0 || ( j == lens && i < lent - 1 ) )
{
printf( "No\n" ) ;
break ;
}
}
if( flag == 1 )
{
printf( "Yes\n" ) ;
}
}
return(0);
}
倚天照海花无数,流水高山心自知。