Run ID:82622

提交时间:2024-07-13 14:24:04

#include <iostream> #include <cstring> using namespace std; int main() { string n; cin>>n; char max; int k=0; for(int i=0; i<n.size(); i++) { if(n[i]=='h') { for(int j=0; j<n.size(); j++) { if(n[j]=='e') { for(int h=0; h<n.size(); h++) { if(n[h]=='l') { k++; } if(k==2) { for(int l=0; l<n.size(); l++) { if(n[l]=='o') { cout<<"YES"; return 0; } } } } } } } } cout<<"NO"; return 0; }