POJ 1936(字符串匹配)
来源:互联网 发布:telnet的端口号是多少 编辑:程序博客网 时间:2024/04/30 00:00
题目链接:http://poj.org/problem?id=1936
#include<iostream>#include<cstdio>#include<cstring>#include<algorithm>#include<cmath>#include<queue>using namespace std;const int INF=0x3f3f3f3f;const int maxn=100010;char s[maxn],t[maxn];int main(){#ifndef ONLINE_JUDGEfreopen("test.in","r",stdin);freopen("test.out","w",stdout);#endifwhile(~scanf("%s%s",s,t)){int lens=strlen(s);int lent=strlen(t);if(lens>lent){printf("No\n");continue;}int cnt=0;for(int i=0;i<lens;i++){for(int j=0;j<lent;j++){if(s[i]==t[j]){cnt++;i++;}}}if(cnt==lens)printf("Yes\n");elseprintf("No\n");}return 0;}
0 0
- POJ 1936(字符串匹配)
- [POJ](1936)All in All ---字符串匹配(串)
- POJ 1936(字符串匹配) 解题报告
- POJ 1936 All in All 字符串匹配
- poj 3461(kmp字符串匹配模板)
- poj 2192 字符串匹配
- POJ 3080 (字符串匹配)
- 【字符串RK匹配】POJ 1200
- poj 1226 暴力字符串匹配
- poj 1936 All in All 简单的字符串匹配
- 字符串匹配之KMP算法(POJ 3461 Oulipo)
- POJ 1080 Human Gene Functions(字符串匹配得分,dp)
- 字符串匹配(暴力匹配)
- POJ 2403 字符串匹配 暴力过
- poj 1226 (字符串匹配,用KMP)
- poj 3461 Oulipo(KMP 字符串匹配算法)
- POJ 3461 Oulipo(KMP字符串匹配)
- POJ-1266/KMP算法/字符串匹配
- LeetCode 69. Sqrt(x)
- Spring依赖注入:注解注入总结
- NYoj42 一笔画问题
- 认识JS
- 收藏的安装Cocoapods流程
- POJ 1936(字符串匹配)
- 【JS学习笔记】 面向对象与原型
- LeetCode 64. Minimum Path Sum
- 做为网址导航生存何在或转行
- 判断滚动滚动到底部
- Android linearlayout中layout_weight详解
- for语句引起一个死循环而引发的思考!!!
- Timer和TimerTask详解
- 87. Scramble String