poj 1936 All in All
来源:互联网 发布:星光大道网络赛区 编辑:程序博客网 时间:2024/06/18 03:57
简单的模拟题,刚开始用dp做,未果。
#include<iostream>#include<string.h>#include<math.h>#include<fstream>#include<algorithm>#include<stdio.h>#include<queue>#include<vector> #define MAXSIZE 100using namespace std;char s1[100001], s2[100001];int main(){ //freopen("data_1936.txt","r",stdin); while(scanf("%s%s", s1, s2) != EOF) { int l1 = strlen(s1); int l2 = strlen(s2); int j = 0; for (int i = 0; i < l2; i++) { if (s2[i] == s1[j]) { j++; } if (j == l1) { break; } } if (j == l1) { printf("Yes\n"); }else { printf("No\n"); } } return 0;}
0 0
- poj 1936 "all in all"
- poj 1936 All in All
- POJ 1936 All in All
- poj 1936 All in All
- POJ 1936 all in all
- POJ 1936 All in All
- POJ 1936 All in All
- POJ 1936 All in All
- POJ-1936-All in All
- poj 1936 all in all
- poj 1936 All in All
- POJ 1936 All in ALL
- poj 1936 All in All
- poj 1936 All in All
- POJ 1936 All in All
- All in All(poj 1936)
- poj 1936 All in All
- poj 1936 All in All
- MySQL在Linux Ubuntu中安装
- hdu 2425 Hiking Trip
- 在EasyUI的DataGrid中嵌入Combobox
- 第五章作业5.17
- Longest Common Prefix
- poj 1936 All in All
- hadoop yarn resouce manager如何避免单点问题
- codeforces Round #310(Div.1) 题解
- 线程同步--悲观锁
- Codeforces Round #310 (Div. 2)
- getch()和getchar()的区别
- 北大ACM试题1011-DFS
- caffe提特征
- 网站首页轮番图的后台管理