Run ID:88780
提交时间:2024-08-21 11:57:58
#include<bits/stdc++.h> using namespace std; char s[1501]; int n; int h=0,e=0,l=0,o=0; int main(){ cin >> s; int n = strlen(s); for(int i=0;i<=n-1;i++) { if(s[i]=='h') { h++; } if(s[i]=='e' && h >= 1) { e++; } if(s[i]=='l' && e >= 1) { l++; } if(s[i]=='o' && l >= 2) { o++; cout << "YES"; return 0; } } cout << "NO"; return 0; }