题意:看一个字符串中是否包含顺序的  w  y  h ,字符之间可以有其他字符,并且如果有多个连续的vv,则可以看做一个w

比较水,直接看代码

 #include<cstdio>
#include<iostream>
#include<algorithm>
#include<cstring>
#include<cmath>
#include<queue>
#include<map>
using namespace std;
#define MOD 1000000007
const int INF=0x3f3f3f3f;
const double eps=1e-;
typedef long long ll;
#define cl(a) memset(a,0,sizeof(a))
#define ts printf("*****\n");
const int MAXN=;
int n,m,tt;
char s[];
char s1[]={'w','y','h'};
int main()
{
int i,j,k;
#ifndef ONLINE_JUDGE
freopen("1.in","r",stdin);
#endif
scanf("%d",&tt);
while(tt--)
{
scanf("%s",&s);
int len=strlen(s);
int tot=;
for(i=;i<len;i++)
{
if(s[i]==s[i+]&&s[i]=='v')
{
s[i]='w';
}
if(s[i]==s1[tot])
{
tot++;
}
}
if(tot==)
{
printf("Yes\n");
}
else printf("No\n");
}
}

hdu 5284 BestCoder Round #48 ($) 1001 水题 *的更多相关文章

  1. HDU5804 Price List (BestCoder Round #86 A)水题

    分析:大于总和输出1 #include <cstdio> #include <cstring> #include <algorithm> using namespa ...

  2. BestCoder Round #65 hdu5590(水题)

    ZYB's Biology Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)T ...

  3. HDU 5280 BestCoder Round #47 1001:Senior's Array

    Senior's Array  Accepts: 199  Submissions: 944  Time Limit: 2000/1000 MS (Java/Others)  Memory Limit ...

  4. 字符串处理 BestCoder Round #43 1001 pog loves szh I

    题目传送门 /* 字符串处理:是一道水题,但是WA了3次,要注意是没有加'\0'的字符串不要用%s输出,否则在多组测试时输出多余的字符 */ #include <cstdio> #incl ...

  5. 贪心 BestCoder Round #39 1001 Delete

    题目传送门 /* 贪心水题:找出出现次数>1的次数和res,如果要减去的比res小,那么总的不同的数字tot不会少: 否则再在tot里减去多余的即为答案 用set容器也可以做,思路一样 */ # ...

  6. 暴力 BestCoder Round #46 1001 YJC tricks time

    题目传送门 /* 暴力:模拟枚举每一个时间的度数 详细解释:http://blog.csdn.net/enjoying_science/article/details/46759085 期末考结束第一 ...

  7. HDU 2096 小明A+B --- 水题

    HDU 2096 /* HDU 2096 小明A+B --- 水题 */ #include <cstdio> int main() { #ifdef _LOCAL freopen(&quo ...

  8. hdu 5667 BestCoder Round #80 矩阵快速幂

    Sequence  Accepts: 59  Submissions: 650  Time Limit: 2000/1000 MS (Java/Others)  Memory Limit: 65536 ...

  9. hdu 5643 BestCoder Round #75

    King's Game  Accepts: 249  Submissions: 671  Time Limit: 2000/1000 MS (Java/Others)  Memory Limit: 6 ...

随机推荐

  1. WAF绕过的技巧

    研究过国内外的waf.分享一些绝技. 一些大家都了解的技巧如:/*!*/,SELECT[0x09,0x0A-0x0D,0x20,0xA0]xx FROM 不再重新提及. 以下以Mysql为例讲述这些技 ...

  2. Windows 下配置使用MemCached(转载)

    工具: memcached-1.2.6-win32-bin.zip     MemCached服务端程序(for win) Memcached Manager             win下的Mem ...

  3. linux下防火墙开启某个端口号及防火墙常用命令使用

    linux防火墙常用命令 1.永久性生效,重启后不会复原 开启:chkconfigiptables on 关闭:chkconfigiptables off 2.即时生效,重启后复原 重启防火墙 方式一 ...

  4. git常见问题解决办法

    1,git status乱码 git config --global core.quotepath false 执行完后再使用时,就显示正常了

  5. php的urlencode()URL编码函数浅析

    URLEncode:是指针对网页url中的中文字符的一种编码转化方式,最常见的就是Baidu.Google等搜索引擎中输入中文查询时候,生成经过Encode过的网页URL.   URLEncode的方 ...

  6. artEditor增加h5拍照上传图片

    摘要: artEditor富文本 编辑器增加了图片拍照功能,点击图片按钮你可以从手机相册选择图片,也可以通过相机拍照上传. 项目地址:https://github.com/baixuexiyang/a ...

  7. Call Paralution Solver from Fortran

    Abstract: Paralution is an open source library for sparse iterative methods with special focus on mu ...

  8. Apache prefork 模块指令分析

    问题背景: 在一台只有内存的vps上安装directadmin之后经常内存耗,经过查看之后发现Apache成了罪魁祸首急速消耗内存SWAP剩余空间都是0,最终导致内核开始大下杀手,把MySQL都杀了, ...

  9. [Effective JavaScript 笔记] 第13条:使用立即调用的函数表达式创建局部作用域

    function wrapElements(a){ var res=[],i,n; for(i=0,n=a.length;i<n;i++){ res[i]=function(){return a ...

  10. iOS高级必备

    1.你使用过Objective-C的运行时编程(Runtime Programming)么?如果使用过,你用它做了什么?你还能记得你所使用的相关的头文件或者某些方法的名称吗? Objecitve-C的 ...