Run ID:144398

提交时间:2026-01-22 10:33:20

#include<bits/stdc++.h> using namespace std; string s; int a=0,b=-1,c=-1,d=-1,e=-1; int main(){ cin>>s; a=s.size(); for(int i=0;i<a;i++){ if(s[i]=='h'&&a==0){ a=i; b++; } if(s[i]=='e'&&b==0){ b=i; c++; } if(s[i]=='l'&&c==0){ c=i; e++; } if(s[i]=='o'&&d==0){ d=i; } if(s[i]=='l'&&e==0){ e=i; d++; } } if(a>b&&b>c&&c>e&&e>d){ printf("YES"); } else{ printf("NO"); } return 0; }