#D. Fake News (easy)

    Type: RemoteJudge 1000ms 256MiB

Fake News (easy)

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

Fake News (easy)

题面翻译

给定一个字符串询问能否通过删除一些字母使其变为“heidi”

如果可以输出“YES”,不然为“NO”

题目描述

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...

输入格式

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

输出格式

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

样例 #1

样例输入 #1

abcheaibcdi

样例输出 #1

YES

样例 #2

样例输入 #2

hiedi

样例输出 #2

NO

提示

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

20230225-字符串的应用-随堂测验

Not Attended
Status
Done
Rule
Ledo
Problem
6
Start at
2023-2-25 10:30
End at
2023-2-25 11:30
Duration
1 hour(s)
Host
Partic.
34