【链接】 我是链接,点我呀:)

【题意】

在这里输入题意

【题解】

相当于让你判断s1是不是s2的子序列。
for一遍就好

【代码】

#include <bits/stdc++.h>
using namespace std; string s1,s2; int main(){
#ifdef LOCAL_DEFINE
freopen("F:\\c++source\\rush_in.txt", "r", stdin);
#endif
while (cin >> s1 >> s2){
int len1 = s1.size(),len2 = s2.size();
int j = 0;
for (int i = 0;i < len2 && j < len1;i++){
if (s2[i]==s1[j]){
j++;
}
}
if (j < len1)
puts("No");
else
puts("Yes");
}
return 0;
}

【习题 3-9 UVA - 10340】All in All的更多相关文章

  1. 贪心水题。UVA 11636 Hello World,LA 3602 DNA Consensus String,UVA 10970 Big Chocolate,UVA 10340 All in All,UVA 11039 Building Designing

    UVA 11636 Hello World 二的幂答案就是二进制长度减1,不是二的幂答案就是是二进制长度. #include<cstdio> int main() { ; ){ ; ) r ...

  2. UVa 10340 - All in All 水题 难度: 0

    题目 https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&a ...

  3. uva 10340 All in All

    水题,从头到尾扫一遍就可以了,输入两个字符串s和t,判断是否可以从t中删除0个或多个字符(其他字符顺序不变),得到字符串s.例如,abcde可以得到bce,但无法得到dc. #include<a ...

  4. UVA 10340 (13.08.25)

    Problem E All in All Input: standard input Output: standard output Time Limit: 2 seconds Memory Limi ...

  5. UVa 10340 子序列

    https://vjudge.net/problem/UVA-10340 题意: 输入两个字符串s和t,判断是否可以从t中删除0个或多个字符得到字符串s. 思路: 很水的题... #include&l ...

  6. UVa 10340 All in All (水题,匹配)

    题意:给定两个字符串,问第一个串能不能从第二个串通过删除0个或多个字符得到. 析:那就一个字符一个字符的匹配,如果匹配上了就往后走,判断最后是不是等于长度即可. 代码如下: #include < ...

  7. UVA 10340 All in All(字符串,朴素匹配)

    #include <stdio.h> #include <algorithm> #include <cstring> using namespace std; ], ...

  8. UVA 10340 - All in All 水~

    看题传送门 Problem E All in All Input: standard input Output: standard output Time Limit: 2 seconds Memor ...

  9. All in All UVA - 10340

     You have devised a new encryption technique which encodes a message by inserting between its charac ...

随机推荐

  1. HOJ——T 2275 Number sequence

    http://acm.hit.edu.cn/hoj/problem/view?id=2275 Source : SCU Programming Contest 2006 Final   Time li ...

  2. C++里的模板

     1.泛型编程 --即实现一个通用的标准容器库. 所谓通用的标准容器库,就是要做到:比方List类存放全部肯恩类型的对象这样的事:泛型编程让你编写一个全然一般化并可反复使用的算法,其效率与针对某特定数 ...

  3. JavaLearning:日期操作类

    package org.fun.classdemo; import java.util.Calendar; import java.util.GregorianCalendar; public cla ...

  4. jquery中最常用的API有哪些

    jquery中最常用的API有哪些 一.总结 一句话总结:取html的方法,class相关的方法,val相关的方法,data相关的方法,attr相关的方法 1.jQuery Object Access ...

  5. javafx Hanoi

    Netbean  java8    source code  :http://files.cnblogs.com/files/rojas/HNT.zip screenshot: 1  model /* ...

  6. Vagrant 和 docker

    Docker应用实践 http://dockerone.com/article/146 Vagrant 适合用来管理虚拟机,而docker适合用来管理应用环境 http://www.linuxidc. ...

  7. spark network-common

    概述 Spark底层使用netty作为节点间通信的桥梁.其实现在common/network-common包中.common/network-common包主要是对netty进行了一层封装,主要是定义 ...

  8. vim--学习之emmet插件前端开发

    Emmet 在vim的使用: 1.嵌套 <ctr+y>+,(ctr+y+逗号三者的组合键,ctr+y一起按在按逗号)相当于Ememet中的Tab键. 2.内容的包围: 写好内容,退出编辑模 ...

  9. idea git ignore 插件

    https://blog.csdn.net/qq_34590097/article/details/56284935

  10. Mindjet MindManager 思维导图软件-使用思维导图跟踪调用流程,绘制软件框架

    思维导图.据说是每一个产品经理必备的软件.假设你阅读大型源码.使用思维导图跟踪调用流程,绘制软件框架将会很方便. 特点:没什么好说的.用过的都说好. 软件截图: 下载:http://www.mindm ...