子序列 (All in All,UVa 10340)

 1 #include 
 2 #include <string.h>
 3 #include <string>
 4 #include 
 5 #include 
 6 #include 
 7 using namespace std;
 8 #define MAXN 100002
 9 int main()
10 {
11     char a[MAXN],b[MAXN];
12     while(cin>>a>>b)
13     {
14         int lena=strlen(a);
15         int lenb=strlen(b);
16         int cur=0;
17         for(int i=0;i)
18         {
19             if(cur==lena)break;
20             if(b[i]==a[cur]){cur++;}
21         }
22         if(cur!=lena)printf("No\n");
23         else printf("Yes\n");
24     }
25 
26     return 0;
27 }

眼瞎~~

转载于:https://www.cnblogs.com/TO-Asia/p/3189218.html

你可能感兴趣的:(子序列 (All in All,UVa 10340))