Codeforces Round #208 (Div. 2) B Dima and Text Messages
#include <iostream>
#include <algorithm>
#include <string> using namespace std; int main(){
int n;
cin >> n;
string words = "<3",tmp;
for(int i = ; i < n ; ++ i){
cin >> tmp;
words +=tmp+"<3";
}
string message;
cin >> message;
if(message.length() < words.length()) cout<<"no"<<endl;
else{
int k = ;
for(int i = ; i < words.length();){
while(k< message.length() && message[k]!=words[i]) k++;
if(k >= message.length()){cout<<"no"<<endl; return ;}
else ++i;
}
cout<<"yes"<<endl;
}
}
Codeforces Round #208 (Div. 2) B Dima and Text Messages的更多相关文章
- Codeforces Round #208 (Div. 2) 358D Dima and Hares
题目链接:http://codeforces.com/problemset/problem/358/D 开始题意理解错,整个就跪了= = 题目大意:从1到n的位置取数,取数的得到值与周围的数有没有取过 ...
- Codeforces Round #208 (Div. 2) A.Dima and Continuous Line
#include <iostream> #include <algorithm> #include <vector> using namespace std; in ...
- Codeforces Round #208 (Div. 2)
A - Dima and Continuous Line 水题:直接模拟: #include<cstdio> #define maxn 1005 using namespace std; ...
- Codeforces Round #167 (Div. 2) D. Dima and Two Sequences 排列组合
题目链接: http://codeforces.com/problemset/problem/272/D D. Dima and Two Sequences time limit per test2 ...
- Codeforces Round #324 (Div. 2) D. Dima and Lisa 哥德巴赫猜想
D. Dima and Lisa Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/584/probl ...
- Codeforces Round #214 (Div. 2) C. Dima and Salad (背包变形)
C. Dima and Salad time limit per test 1 second memory limit per test 256 megabytes input standard in ...
- Codeforces Round #214 (Div. 2) C. Dima and Salad 背包
C. Dima and Salad Dima, Inna and Seryozha have gathered in a room. That's right, someone's got to ...
- Codeforces Round #324 (Div. 2)D. Dima and Lisa 数学(素数)
D. Dima and Lisa Dima loves representing an odd num ...
- Codeforces Round #553 (Div. 2)B. Dima and a Bad XOR 思维构造+异或警告
题意: 给出一个矩阵n(<=500)*m(<=500)每一行任选一个数 异或在一起 求一个 异或在一起不为0 的每行的取值列号 思路: 异或的性质 交换律 x1^x2^x3==x3^x2 ...
随机推荐
- Bitwise AND of Numbers Range
Given a range [m, n] where 0 <= m <= n <= 2147483647, return the bitwise AND of all numbers ...
- ali2015校园招聘笔试大题
[本文链接] http://www.cnblogs.com/hellogiser/p/ali-2015-questions.html 1. 写一个函数,输入一个二叉树,树中每个节点存放了一个整数值,函 ...
- 【转】cas注册后自动登录
本文转自:http://denger.iteye.com/blog/805743 1. 关于CAS的介绍不再累述,我想涉及过SSO同学应该都会对该框架所有了解,我们目前项目采用的CAS Server ...
- iOS 推荐一个下载用的第三方库
AFNetworking有下载功能,但是下载功能比较基本,要实现复杂下载功能需要自己写一些代码.今天在github上找到了一个下载功能的开源项目,非常不错,链接如下:https://github.co ...
- Java for LeetCode 034 Search for a Range
Given a sorted array of integers, find the starting and ending position of a given target value. You ...
- 【JAVA、C++】LeetCode 013 Roman to Integer
Given a roman numeral, convert it to an integer. Input is guaranteed to be within the range from 1 t ...
- HDU 2.1.7 (求定积分公式)
The area Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Subm ...
- 【Python爬虫】入门知识
爬虫基本知识 这阵子需要用爬虫做点事情,于是系统的学习了一下python爬虫,觉得还挺有意思的,比我想象中的能干更多的事情,这里记录下学习的经历. 网上有关爬虫的资料特别多,写的都挺复杂的,我这里不打 ...
- SVN服务器搭建和使用(三)(转载)
转载地址:http://www.cnblogs.com/xiaobaihome/archive/2012/03/20/2408089.html 接下来,试试用TortoiseSVN修改文件,添加文件, ...
- 【ACM - 搜索模板】
[广搜模板] #include <iostream> #include <stdio.h> #include <string.h> #include <que ...