All in All UVA - 10340
2017-04-03 12:38
274 查看
问题类型:解密,字符串。
03pie’s solution for [UVA-10340]:
03pie’s solution for [UVA-10340]:
#include<cstdio> #include<iostream> #include<sstream> #include<cstdlib> #include<cmath> #include<cctype> #include<string> #include<cstring> #include<algorithm> #include<stack> #include<queue> #include<set> #include<map> #include<ctime> #include<vector> #include<fstream> #include<list> using namespace std; #define ms(s) memset(s,0,sizeof(s))typedef unsigned long long ULL; typedef long long LL; const double PI = 3.141592653589; const int INF = 0x3fffffff; #define maxn 101000 char org[maxn]; char encrp[maxn]; int main(){ // freopen("F://inp.txt","r",stdin); while(scanf("%s%s",org,encrp)!=EOF) { int orglen=strlen(org); int encrplen=strlen(encrp); int next=0,count=0; for(int i=0;i<orglen;i++) { for(int q=next;q<encrplen;q++) { if(encrp[q]==org[i]) { count++; next=q+1; break; } } } if(count==orglen) { printf("Yes\n"); } else { printf("No\n"); } } return 0; }
相关文章推荐
- UVa 10340 - All in All
- uva 10340 All in All
- UVA 10340 All in All
- UVA 10340 - All in All
- UVa 10340, All in All
- UVa 10340 All in all
- UVA 10340 All in All .
- UVa 10340 All in All
- UVA-10340 All in All
- Uva 10340 - All in All
- uva 10340 - All in All
- UVA 10340 - All in All
- (入门) uva 10340 All in all
- UVa 10340 All in All
- 习题3-9 UVa10340 All in All
- uva10340 -All in All
- UVA 10340 All in All
- 【习题 3-9 UVA - 10340】All in All
- UVA - 10340 All in All
- All in All, UVa 10340