4230: 假新闻

内存限制:256 MB 时间限制:2 S 标准输入输出
题目类型:传统 评测方式:文本比较 上传者:
提交:10 通过:8

题目描述

As it's the first of April, Heidi is suspecting that the news she reads today are fake, and she does not want to look silly in front of all the contestants. She knows that a newspiece is fake if it contains heidi as a subsequence. Help Heidi assess whether the given piece is true, but please be discreet about it...

今天是四月一号,Heidi怀疑她今天看到的新闻是假的,她不想在所有参赛者面前显得很傻。她知道一份报纸如果包含 Heidi 作为子序列就是假的。帮助海蒂评估这篇文章是否属实,但请谨慎对待....

输入格式

The first and only line of input contains a single nonempty string $ s $ of length at most $ 1000 $ composed of lowercase letters (a-z).

第一行也是唯一一行的输入包含一个长度不超过$1000$的非空字符串 $s$,这个字符串由小写字母(a-z)组成。

输出格式

Output YES if the string $ s $ contains heidi as a subsequence and NO otherwise.

如果字符串 $s$ 包含 heidi 作为子序列,则输出 YES,否则输出 NO。

输入样例 复制

abcheaibcdi

输出样例 复制

YES

数据范围与提示

样例输入 #1

abcheaibcdi

样例输出 #1

YES

样例输入 #2

hiedi

样例输出 #2

NO

提示

A string $ s $ contains another string $ p $ as a subsequence if it is possible to delete some characters from $ s $ and obtain $ p $ .

如果可以从字符串$s$中删除一些字符并获得$p$,则字符串$s$包含另一个字符串$p$作为子序列。