CF58A.Chat room
入门
通过率:0%
时间限制:1.00s
内存限制:256MB
AC君温馨提醒
该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。
题目描述
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.
瓦西娅最近学会了打字并登录互联网。他立刻进入了一个聊天室,决定向大家问好。瓦西娅输入了单词 s。如果可以从输入的单词中删除若干字母,使得剩余字母(保持原有顺序)恰好构成单词 “hello”,则认为瓦西娅成功问好了。例如,若瓦西娅输入的单词是 ahhellllloou,则认为他成功问好了;而若他输入的是 hlelo,则认为他被误解了,未能成功问好。请根据给定的单词 s 判断瓦西娅是否成功问好了。
输入格式
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.
第一行且唯一一行包含 Vasya 输入的单词 s。该单词由小写拉丁字母组成,长度不少于 1 个字母,不超过 100 个字母。
输出格式
If Vasya managed to say hello, print "YES", otherwise print "NO".
如果瓦西娅成功说了“hello”,则输出“YES”,否则输出“NO”。
输入输出样例
输入#1
ahhellllloou
输出#1
YES
输入#2
hlelo
输出#2
NO
输入解题思路,AI测评打分。不知道怎么写?