/*

Vasya has recently learned to type and log on to the Internet. He immediately entered a chat room and decided to say hello to everybody. Vasya typed the word s. It is considered that Vasya managed to say hello if several letters can be deleted from the typed word so that it resulted in the word "hello". For example, if Vasya types the word "ahhellllloou", it will be considered that he said hello, and if he types "hlelo", it will be considered that Vasya got misunderstood and he didn't manage to say hello. Determine whether Vasya managed to say hello by the given word s.

Input

The first and only line contains the word s, which Vasya typed. This word consisits of small Latin letters, its length is no less that 1 and no more than 100 letters.

Output

If Vasya managed to say hello, print "YES", otherwise print "NO".

Example

Input
ahhellllloou
Output
YES
Input
hlelo
Output
NO

*/
#include <iostream>
#include <string.h>
#include <stdio.h>
using namespace std; char a[]; int main()
{
    cin >> a;
    getchar();
    int k = ;
    int i,j,n,m,v;
    for(i = ; i <= strlen(a); i ++)
    {
        if(a[i] == 'h')
        {
            k ++;
            int I=i;
            i=strlen(a);
            //cout << k << endl;
            for(int j = (I+); j <= strlen(a); j++)
            {
                if(a[j] == 'e')
                {
                    k++;
                    int J=j;
                    j=strlen(a);
                    for(int n = J+; n <= strlen(a); n++)
                    {
                        if(a[n] == 'l')
                        {
                            k++;
                            int N=n;
                            n=strlen(a);
                            //cout << k << endl;
                            for(int m = N+; m <= strlen(a); m++)
                            {
                                if(a[m] == 'l')
                                {
                                    k++;
                                    int M=m;
                                    m=strlen(a);
                                    //cout << k << endl;
                                    for(int v = M+; v <= strlen(a); v++)
                                    {
                                        if(a[v] == 'o')
                                            {
                                                k++;
                                                v=strlen(a);
                                            }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
    if(k >= )
        cout << "YES" <<endl;
    else cout << "NO" <<endl;
    //cout << k << endl;
    return ;
}
 

Chat room的更多相关文章

  1. 三周,用长轮询实现Chat并迁移到Azure测试

    公司的OA从零开始进行开发,继简单的单点登陆.角色与权限.消息中间件之后,轮到在线即时通信的模块需要我独立去完成.这三周除了逛网店见爱*看动漫接兼职,基本上都花在这上面了.简单地说就是用MVC4基于长 ...

  2. Socket programing(make a chat software) summary 1:How to accsess LAN from WAN

    First we should know some basic conceptions about network: 1.Every PC is supposed to have its own IP ...

  3. Node聊天程序实例03:chat.js

    作者:vousiu 出处:http://www.cnblogs.com/vousiu 本实例参考自Mike Cantelon等人的<Node.js in Action>一书. chat.j ...

  4. Fake chat script for website download

    Are you searching for free fake webchat script then you are at the right place go get download your ...

  5. IRC(Internet Relay Chat Protocol) Protocal Learning && IRC Bot

    catalogue . Abstract . INTRODUCTION . 通信协议Connection Registration Action . 通信协议Channel operations Ac ...

  6. HDU 5071 Chat(2014鞍山赛区现场赛B题)

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5071 解题报告:一个管理聊天窗口的程序,一共有八种操作,然后要注意的就是Top操作只是把编号为u的窗口 ...

  7. ocket.chat 使用 Meteor 开发的实时协作工具,类似 丁丁。

    ocket.chat  使用 Meteor 开发的实时协作工具,类似 丁丁. https://rocket.chat/

  8. 局域网聊天Chat(马士兵视频改进版)

    Github地址: https://github.com/BenDanChen/Chat Chat 小小的聊天系统,主要是跟着网上的马士兵老师的公开视频然后再自己反思有什么地方需要改进的地方,然后大体 ...

  9. Dig out deleted chat messages of App Skype

    Last month Candy was arrested on suspicion of having doing online porn webcam shows, but Candy refus ...

  10. [CareerCup] 8.7 Chat Server 聊天服务器

    8.7 Explain how you would design a chat server. In particular, provide details about the various bac ...

随机推荐

  1. C# CefSharp MemoryStreamResponseFilter这个类使用过程中遇到的bug,dataIn.CopyTo(dataOut)异常

    使用这个类,可以获取请求的所有数据,可用来下载网站的图片.js等 cef给出的源码 dataIn.CopyTo(dataOut);这句代码,有时候会有问题.问题是这个:dataIn.length 会大 ...

  2. js基础-运算符

    100 * "20" 字符串转数字 5 * "ss"  NAN "ss" 转数字返回NAN 任何数字与NAN +-*/ 都返回NAN 5/N ...

  3. Java NIO Files

    Java NIO Files Files.exists() Files.createDirectory() Files.copy() Overwriting Existing Files Files. ...

  4. echarts 树图

    1 事件:事件绑定,事件命名统一挂载到require('echarts/config').EVENT(非模块化为echarts.config.EVENT)命名空间下,建议使用此命名空间作为事件名引用, ...

  5. SQL Select语句完整的执行顺序(转)

    SQL Select语句完整的执行顺序: 1.from子句组装来自不同数据源的数据: 2.where子句基于指定的条件对记录行进行筛选: 3.group by子句将数据划分为多个分组: 4.使用聚集函 ...

  6. Centos新增group和user

    新增group groupadd hadoop 新增用户 useradd -d /usr/hadoop -g hadoop -m hadoop 设置密码 passwd hadoop

  7. 用PLSQL Developer 查看连接因子 tnsnames.ora

    1 2

  8. exe4j 安装

    需要看清楚对应的jre版本 4.6---jre1.6 5.0以上---jre1.7

  9. Mac上安装Git

    转载注明出处:http://blog.csdn.net/xiaohanluo/article/details/53214933 Git安装 下载Git有两种方法 直接下载安装包,Git下载地址 用ho ...

  10. pandas_1

    大熊猫10分钟 这是对熊猫的简短介绍,主要面向新用户.您可以在Cookbook中看到更复杂的食谱. 通常,我们导入如下: In [1]: import numpy as np In [2]: impo ...