习题3-9 子序列(All in All, UVa 10340)
2017-11-24 16:16
453 查看
#include <iostream> #include <string> #include <cstring> #define mem(x) memset(x,0,sizeof(x)) using namespace std; int main() { string s1,s2; while(cin>>s1>>s2) { int l1=s1.length(),l2=s2.length(); int i=0,j=0; while(i<l1&&j<l2) { if(s1[i]==s2[j]) { i++; } j++; } if(i==l1) { cout<<"Yes"<<endl; } else cout<<"No"<<endl; } return 0; }
相关文章推荐
- UVa10340--All in All 子序列 紫书习题3-9
- 小紫书 习题 3-9(UVA 10340)子序列(All in All)
- 算法竞赛入门-习题3-9 子序列(All in All, UVa 10340)
- 算法竞赛入门经典(第2版)习题3-9 子序列(All in All) Uva10340
- 习题3-9 子序列(All in All, UVa 10340)
- 子序列(All in All, UVa 10340)
- UVA 10340 All in All 子序列判定 贪心
- uva 10340 - All in All(子序列)
- 习题 3 -9 子序列(All in All) UVa 10304
- UVa - 10340 - All in All(暴力遍历、子序列)
- UVa 10340 All in All(子序列)
- 习题3-9 UVa10340 All in All
- 【习题3-9】UVA - 10340 All in All
- 【习题 3-9 UVA - 10340】All in All
- 子序列-All in All,UVa10340
- UVa 10340 - All in All
- UVA - 10340 All in All(水题)
- Problem 018 ——UVa 10340 - All in All
- UVa10340——All in all
- uva 10340 - All in All