poj1936 All in All
1 #include<stdio.h> 2 char str[100001],sub[100001]; 3 int main() 4 { 5 int i,k; 6 while(~scanf("%s%s",sub,str)) 7 { 8 for(k=i=0;str[i];i++) 9 if(str[i]==sub[k]&&sub[k]) 10 k++; 11 if(sub[k]) printf("No\n"); 12 else printf("Yes\n"); 13 } 14 return 0; 15 }