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

【题意】

在这里输入题意

【题解】

相当于让你判断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. Nginx+tomcat+ssl免费证书配置

    0.说明 本文说描写叙述的方式是用nginx的443重定向到tomcat的8443,nginx的80port重定到tomcat的8080: 乱入:个人标记:caicongyang 1.nginx安装 ...

  2. codeforces 543 C Remembering Strings

    题意:若一个字符串集合里的每一个字符串都至少有一个字符满足在i位上,仅仅有它有,那么这个就是合法的,给出全部串的每一个字符修改的花费,求变成合法的最小代价. 做法:dp[i][j].前i个串的状态为j ...

  3. es62

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  4. html5中的空格符

    html5中的空格符 1,Html中空格      不断行的空白(1个字符宽度)      半个空白(1个字符宽度)     一个空白(2个字符宽度)      窄空白(小于1个字符宽度) 2,Css ...

  5. 轻松八步搞定Cacti配置安装(原创视频)

    轻松八步搞定Cacti配置安装 1.安装web server $sudo apt-get install apache2 验证 http://localhost 2.$sudo apt-get ins ...

  6. RPC简易学习

    0.RPC简介 RPC,   英文全称:Remote Process Call.   中文全称:远程过程调用. 客户端通过网络请求调用远程服务端对外暴露服务.常用的两种RPC协议:TCP.HTTP. ...

  7. 洛谷 P3111 [USACO14DEC]牛慢跑Cow Jog_Sliver

    P3111 [USACO14DEC]牛慢跑Cow Jog_Sliver 题目描述 The cows are out exercising their hooves again! There are N ...

  8. FragMent-通过Arguments方法 跟activity通信

    今天主要学习下通过Arguments,实现activity 给fragment传递数据.这个方法也是通过参数bundle来进行数据传输的 直接看如下代码 一,定义一个fragment,在oncreat ...

  9. worktools-monkey 测试工具的使用

    配置电脑环境 1.进入用户目录下的bin cd ~/bin 2.链接一下monkey monkey -> /home/zhangshuli/git/vanzo_team/xulei/monkey ...

  10. [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.0:compile (default-compile) 问题解决

    问题描述详情: 无论你的问题是3.0还是3.1还是任何一个版本,则都可以通过以下版本来解决 解决办法: 把默认的Internal JRE改成了JAVA_HOME. 运行后成功了,截图如下: