poj 1936(水题)
作者:互联网
#include<iostream> #include<cstring> using namespace std; int main(){ char a[100005],b[100005]; int i,j,len_a,len_b; while(scanf("%s%s",a,b)==2){ len_a = strlen(a); len_b = strlen(b); j = 0; for(i=0;i<len_a&&j<len_b;){ if(a[i]==b[j]){ i++; j++; } else{ j++; } } if(i==len_a){ printf("Yes\n"); } else{ printf("No\n"); } } return 0; }
标签:std,水题,int,len,100005,poj,1936,include,strlen 来源: https://www.cnblogs.com/stevenzrx/p/15566184.html