/*

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. python基础学习Day10 函数形参的动态参数、*args **kwargs 命名空间 global 与 nonlocal

    一.函数形参的动态参数 原因:为了拓展,对于实参数量不固定,故需要万能参数,即动态参数, *args   **kwargs # def sum1(*args): # 在函数定义时,在*位置参数,聚合. ...

  2. Failed to acquire connection "SAP_PRD_NEW.SAPSR3". Connection may not be configured correctly or you may not have the right permissions

    SQLSERVER JOB无法执行 错误提示: Message Executed as user: WORKGROUP\NSDZHSCMFP01$. Microsoft (R) SQL Server ...

  3. asp.net导出excle

    思路:实际上是读取页面上某个控件下的内容再导出 protected void btnExcel_Click(object sender, EventArgs e) { string bgType = ...

  4. Oracle数据导出导入

    总结了几种Oracle导入导出的命令方法,方便以后使用.      数据导出: 1. 将数据库test完全导出,用户名system 密码manager 导出到d:/daochu.dmp中        ...

  5. StringBuffer类和String类(原文地址 : http://www.cnblogs.com/springcsc/archive/2009/12/03/1616330.html)

    StringBuffer类和String一样,也用来代表字符串,只是由于StringBuffer的内部实现方式和String不同,所以StringBuffer在进行字符串处理时,不生成新的对象,在内存 ...

  6. 由于html元素加载导致的问题

    js中要求执行的事件是在完全加载完,但由于本地环境测试一直没发现出问题,在上线后由于网络延迟导致元素加载慢,而事件执行完,没达到预期目标. 这时就需要用到属性 readyState readyStat ...

  7. js两个数组对象通过相同元素匹配筛选

    let a = [ { name: 'joy', year: '24' }, { name: 'eve', year: '25' } ] let b = [ { name: 'joy', city: ...

  8. ubuntu下java的安装即使用

    1.首先在官方网站(点击可以下载)下载最新的JDK,要选用self extracting installer 2.在/usr/下新建java目录,把下载的文件放到这个目录下 sudo mkdir /u ...

  9. Delphi: 圆形进度(环形进度)

    起源: 重回DC5项目,资源下载美工提供圆形进度条,复习Delphi,为实现其颇觉有趣,遂研究其. 最终效果图如下: 实现: 制作TCircleProgress控件,实现方法参照系统之TGauge控件 ...

  10. 【Linux 进程】fork父子进程间共享数据分析

    之前我们通过fork()函数,得知了父子进程之间的存在着代码的拷贝,且父子进程都相互独立执行,那么父子进程是否共享同一段数据,即是否存在着数据共享.接下来我们就来分析分析父子进程是否存在着数据共享. ...