【链接】h在这里写链接


【题意】


在这里写题意

【题解】


枚举它是在连接处,还是就是整个字符串就好。

【错的次数】


0

【反思】


在这了写反思

【代码】

#include <bits/stdc++.h>
using namespace std; const int N = 100; string s;
string ts[N+10]; int main()
{
//freopen("F:\\rush.txt","r",stdin);
ios::sync_with_stdio(0),cin.tie(0);
int n;
cin >> s;
cin >> n;
for (int i = 1;i <= n;i++)
cin >> ts[i];
for (int i = 1;i <= n;i++)
if (ts[i]==s)
return cout <<"YES"<<endl,0;
for (int i = 1;i <= n;i++)
{
string temp = "";
temp += ts[i][1];
temp += ts[i][0];
for (int j = 1;j <= n;j++)
{
temp[1] = ts[j][0];
if (temp==s)
return cout << "YES"<<endl,0;
}
}
cout << "NO"<<endl;
return 0;
}

【Codeforces Round #438 A】Bark to Unlock的更多相关文章

  1. 【Codeforces Round #438 C】 Qualification Rounds

    [链接]h在这里写链接 [题意] 给你n个问题,每个人都知道一些问题. 然后让你选择一些问题,使得每个人知道的问题的数量,不超过这些问题的数量的一半. [题解] 想法题. 只要有两个问题. 这两个问题 ...

  2. 【Codeforces Round #438 B】Race Against Time

    [链接]h在这里写链接 [题意] 时针.分钟.秒针走不过去. 问你从t1时刻能不能走到t2时刻 [题解] 看看时针.分钟.秒针的影响就好. 看看是不是在整时的位置就好. 然后看看影响到x不能到y; 然 ...

  3. 【Codeforces Round 438 A B C D 四个题】

    题目所在比赛的地址在这里呀 A. Bark to Unlock ·述大意:       输入一个目标串.然后输入n(1<=n<=100)个串,询问是否可以通过这些串收尾相接或者它本身拼出目 ...

  4. Codeforces Round #438 (Div.1+Div.2) 总结

    本来兴致勃勃的想乘着这一次上紫,于是很早很早的到了机房 但是好像并没有什么用,反而rating-=47 Codeforces Round #438(Div.1+Div.2) 今天就这样匆匆的总结一下, ...

  5. 【Codeforces #312 div2 A】Lala Land and Apple Trees

    # [Codeforces #312 div2 A]Lala Land and Apple Trees 首先,此题的大意是在一条坐标轴上,有\(n\)个点,每个点的权值为\(a_{i}\),第一次从原 ...

  6. 【Codeforces Round 431 (Div. 2) A B C D E五个题】

    先给出比赛地址啦,感觉这场比赛思维考察非常灵活而美妙. A. Odds and Ends ·述大意:      输入n(n<=100)表示长度为n的序列,接下来输入这个序列.询问是否可以将序列划 ...

  7. 【Codeforces Round】 #432 (Div. 2) 题解

    Codeforces Round #432 (Div. 2, based on IndiaHacks Final Round 2017)  A. Arpa and a research in Mexi ...

  8. 【Codeforces Round】 #431 (Div. 2) 题解

    Codeforces Round #431 (Div. 2)  A. Odds and Ends time limit per test 1 second memory limit per test ...

  9. 【Codeforces Round 1137】Codeforces #545 (Div. 1)

    Codeforces Round 1137 这场比赛做了\(A\).\(B\),排名\(376\). 主要是\(A\)题做的时间又长又交了两次\(wa4\)的. 这两次错误的提交是因为我第一开始想的求 ...

随机推荐

  1. mootools常用特性和示例(基础篇1)

    网上关于mootools这个库的信息很少. 公司一些老的项目用到了mootools库,因为要维护,所以接触到了mootools. mootools(文档)官网:http://www.chinamoot ...

  2. es6三点运算符的用法

    扩展运算符( spread )是三个点(...).它好比 rest 参数的逆运算,将一个数组转为用逗号分隔的参数序列. console.log(...[1,2,3]); console.log(1,. ...

  3. [AngularFire 2] Push, remove, update

    import { Injectable } from '@angular/core'; import {RealtimeService} from "../shared"; imp ...

  4. 结合Wireshark捕获分组深入理解TCP/IP协议栈

    摘要:     本文剖析了浏览器输入URL到整个页面显示的整个过程,以百度首页为例,结合Wireshark俘获分组进行详细分析整个过程,从而更好地了解TCP/IP协议栈.   一.俘获分组 1.1 准 ...

  5. 21、IIS声卡驱动程序

    声卡芯片的数据通道一般都是IIS接口,但是控制音量等控制信息的接口都不相同 (新内核在linux-3.4.2\sound\soc\codecs\uda134x.c) uda134x_codec_pro ...

  6. 搭建hbase-0.94.26集群环境 分类: B7_HBASE 2015-01-24 17:14 861人阅读 评论(0) 收藏

    先安装hadoop1.2.1,见http://blog.csdn.net/jediael_lu/article/details/38926477 1.配置hbase-site.xml <prop ...

  7. (二)RabbitMQ消息队列-RabbitMQ消息队列架构与基本概念

    原文:(二)RabbitMQ消息队列-RabbitMQ消息队列架构与基本概念 没错我还是没有讲怎么安装和写一个HelloWord,不过快了,这一章我们先了解下RabbitMQ的基本概念. Rabbit ...

  8. itunes app 下载链接的几种表现形式

    第一种:itunes://itunes.apple.com/cn/app/id794862904 ,这是最普通的一种. 直接在浏览器中输入.就能够打开电脑上安装的itunes,并跳转到相应的app下载 ...

  9. goodFeaturesToTrack——Shi-Tomasi角点检测

    J.Shi和C.Tomasi在1994年在其论文"Good Features to Track"中,提出了一种对Harris角点检测算子的改进算法--Shi-Tomasi角点检测算 ...

  10. bash - Logical_OR

    转载 https://bash.cyberciti.biz/guide/Logical_OR Logical OR   ← Logical AND Home Logical Not ! → Logic ...