Run ID:88760
提交时间:2024-08-21 11:17:26
#include<bits/stdc++.h> using namespace std; char a[1500]; int h=0,e=0,l1=0,l2=0,o=0; int main(){ cin>>a; for(int i=0;i<=1500;i++){ if(a[i]=='h'){ h=1; } if(a[i]=='e'&&h==1){ e=1; } if(a[i]=='l'&&e==1){ l1=1; } if(a[i]=='l'&&l1==1){ l2=1; } if(a[i]=='o'&&l2==1){ o=1; } } if(o=1){ cout<<"YES"; } else{ cout<<"NO"; } return 0; }