codeforces-scrape

Codeforces scraped problems and editorials
git clone git://git.laack.co/codeforces-scrape.git
Log | Files | Refs | README

58A.md (1104B)


      1 Source: https://codeforces.com/problemset/problem/58/A
      2 
      3 A. Chat room
      4 
      5 time limit per test
      6 
      7 1 second
      8 
      9 memory limit per test
     10 
     11 256 megabytes
     12 
     13 input
     14 
     15 stdin
     16 
     17 output
     18 
     19 stdout
     20 
     21 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*.
     22 
     23 Input
     24 
     25 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.
     26 
     27 Output
     28 
     29 If Vasya managed to say hello, print "YES", otherwise print "NO".
     30 
     31 Examples
     32 
     33 Input
     34 
     35 ```
     36 ahhellllloou
     37 ```
     38 
     39 Output
     40 
     41 ```
     42 YES
     43 ```
     44 
     45 Input
     46 
     47 ```
     48 hlelo
     49 ```
     50 
     51 Output
     52 
     53 ```
     54 NO
     55 ```