Run ID:71750

提交时间:2024-04-27 16:12:16

#include <iostream> #include <cmath> using namespace std; int main() { char a[1501],b[5]={'h','e','l','l','o'}; cin>>a; int len=strlen(a),y=1; for(int i=1;i<=len;i++) { if(a[i]==b[y]) { y++; } } if(y==5) cout<<"YES"; else cout<<"NO"; return 0; }