-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathA.cpp
45 lines (38 loc) · 729 Bytes
/
A.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
#define mp make_pair
#define pb push_back
bool cmp (int a, int b) {
return a>b;
}
void solve(){
// Solve here
string s;
cin>>s;
int l = s.length();
// sort(s.begin(), s.end());
string temp = "hello";
bool flag = false;
int j=0;
for(int i=0;i<l;i++) {
if(s[i] == temp[j]) j++;
}
if(j==5) cout<<"YES";
else cout<<"NO";
}
int main() {
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
#endif
ios::sync_with_stdio(0);
cout.tie(0);
cin.tie(0);
int t=1;
// cin>>t;
while(t--){
solve();
}
return 0;
}