poj1936
来源:互联网 发布:淘宝类目排行榜 编辑:程序博客网 时间:2024/05/17 03:22
水题一道
#include <string>#include <iostream>using namespace std;int main(){string s,t;while (cin >> s){cin >> t;int ls=s.length();int lt=t.length();if(ls>lt){cout << "No" << endl;continue;}else if(ls==lt){if(t.find(s)!=string::npos)cout << "Yes" << endl;elsecout << "No" << endl;continue;}else{if(t.find(s)!=string::npos){cout << "Yes" << endl;continue;}else{int i=0,j=0;while (i<ls&&j<lt){if(s[i]==t[j]){i++;j++;}else j++;}if(i==ls)cout << "Yes" <<endl;elsecout << "No" << endl;}}}}
- poj1936
- poj1936
- poj1936
- poj1936
- poj1936
- poj1936
- poj1936
- poj1936
- poj1936
- POJ1936
- poj1936
- poj1936
- poj1936
- poj1936 水题
- poj1936找子串
- poj1936 All in All
- POJ1936--All in All
- POJ1936:All in All
- 在Dos命令行下编译Java程序问题和解决方法集锦
- oracle 子查询、集合操作、复杂查询
- Hbase常见配置问题解决
- KMP Next 再次详解
- 深入分析各种raid模式
- poj1936
- 利用tomcat服务器实现多线程下载 3
- js javascript 判断字符串是否包含某字符串,String对象中查找子字符,indexOf
- 霍夫变换(Hough Transform)
- java.lang.OutOfMemoryError: PermGen space 的疑惑
- 频率域图像处理基础
- GtkNotebook使用
- 工作之感慨~~~~~~~
- xmln:tools的作用