Run ID:98377

提交时间:2024-11-20 15:35:11

#include<bits/stdc++.h> using namespace std; int main(){ char a[2000],b[5]={'h','e','l','l','o'},c[10]; gets(a); int len=strlen(a); int m=0,n=0; for(int i=0;i<=5;i++){ for(int j=m;j<len;j++){ if(b[i]==a[j]){ c[n++]=a[j]; break; } m++; } } if(strcmp(b,c)==0){ cout<<"YES"; } else{ cout<<"NO"; } return 0; }